Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Cython compiled version of GeomDL or PyMCubes in Blender 4.1 because --install-option is depreciated in Python 3.11.7. #5117

Open
futuremotiondev opened this issue May 3, 2024 · 3 comments

Comments

@futuremotiondev
Copy link

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

  1. Install Blender 4.1
  2. Navigate to C:\Program Files\Blender Foundation\Blender 4.1\4.1\python\bin in an elevated Powershell or CMD shell.
  3. Ensure PIP is installed and updated by following this.
  4. Run .\python.exe -m pip install Cython
  5. Run .\python.exe -m pip install geomdl --install-option="--use-cython" (Powershell), or python.exe -m pip install geomdl --install-option="--use-cython" (CMD).
  6. 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!

@satabol
Copy link
Collaborator

satabol commented May 6, 2024

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"

image

comment: Source Sverchok docs geomdl: https://github.com/nortikin/sverchok/wiki/GeomDL

@futuremotiondev
Copy link
Author

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"?

@satabol
Copy link
Collaborator

satabol commented May 13, 2024

Hi @futuremotiondev

You are right! I read instruction more carefully and test my build. It is not cytonized version.
image

I have Visual Studio Community Edition 2022:
image

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:
image

Now one can import libraries but with some changes:

image

Also pay attention that this library NURBS-Python did not updated for 3 years:
image

so sublibraries can be outdated (like a numpy library).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants