Can't install Cython compiled version of GeomDL or PyMCubes in Blender 4.1 because `--install-option` is depreciated in Python 3.11.7.
futuremotiondev opened this issue · 3 comments
Problem statement
From the wiki:
but this way you will get pure-python library, which is very slow. If you want it fast, then you have to install Cython (see previous paragraph for instruction). After you installed Cython, you can install "cythonized" geomdl as it is described in Geomdl instruction:
The steps in the relevant WIKI state to install GeomDL like this:
C:\Program Files\Blender Foundation\Blender 4.1\4.1\python\bin> .\python.exe -m pip install geomdl --install-option="--use-cython"
But --install-option
is now depreciated in Python 3.11.7 and there is no instruction on how to build a "Cythonized" (Compiled) version of GeomDL (or PyMCubes either) for the added speed boost / optimizations that Cython provides for Blender 4+ builds.
Steps to reproduce
- Install Blender 4.1
- Navigate to
C:\Program Files\Blender Foundation\Blender 4.1\4.1\python\bin
in an elevated Powershell or CMD shell. - Ensure PIP is installed and updated by following this.
- Run
.\python.exe -m pip install Cython
- Run
.\python.exe -m pip install geomdl --install-option="--use-cython"
(Powershell), orpython.exe -m pip install geomdl --install-option="--use-cython"
(CMD). - View error.
Expected result
A Cython compiled install of GeomDL with the promised speed boost.
Actual result
no such option: --install-option
Sverchok version
From sverchok-master.zip
Any help or information would be greatly appreciated!
Hi @futuremotiondev
Can you try these steps? (replace paths to your Blender install path)
https://github.com/orbingol/NURBS-Python
cd /d E:\Enternet\Projects\github.com\NURBS-Python
"E:\install\Blender\blender-4.1.1-windows-x64\4.1\python\Scripts\pip.exe" install --user . --config-settings="--use-cython=True"
comment: Source Sverchok docs geomdl: https://github.com/nortikin/sverchok/wiki/GeomDL
It successfully installed after following your steps. Not sure if it's actually Cython-compiled, but it worked. Is there any way to test if the install is "Cythonized"?
You are right! I read instruction more carefully and test my build. It is not cytonized version.
I have Visual Studio Community Edition 2022:
I have read in the docs about MinGW. I did not try it.
Now I did next steps:
(change path to your blender path and local python path)
mklink /d "e:\install\Blender\blender-4.1.1-windows-x64\4.1\python\include" "D:\Python\Python.3.10.11\include"
mklink /d "e:\install\Blender\blender-4.1.1-windows-x64\4.1\python\include" "D:\Python\Python.3.10.11\include"
e:\install\Blender\blender-4.1.1-windows-x64\4.1\python\bin\python.exe setup.py build_ext --use-cython --inplace install
and now you can see work of compilator:
Now one can import libraries but with some changes:
Also pay attention that this library NURBS-Python did not updated for 3 years:
so sublibraries can be outdated (like a numpy library).