uci-rendering / psdr-cuda

Path-space differentiable renderer
BSD 3-Clause "New" or "Revised" License
155 stars 11 forks source link

No module named 'enoki' #27

Open JakeXin7 opened 2 years ago

JakeXin7 commented 2 years ago

Platform: Windows 10 Python version: 3.8.13

I have decompressed the provided package to ext_win64 under PSDR-CUDA’s root directory. And I ran the following commands under the command prompt:

activate psdr
mkdir build
cd build
cmake -D PYTHON_ROOT="D:\Anaconda3\env\psdr" -G "Visual Studio 16 2019" -A x64 ..
cmake --build . --config Release
copy /y lib\Release\*.pyd lib\

And added the following paths into both PATH and PYTHONPATH:

D:\study\CG\download\psdr-cuda\ext\include
D:\study\CG\download\psdr-cuda\ext_win64\enoki
D:\study\CG\download\psdr-cuda\ext_win64\enoki\python\enoki
D:\study\CG\download\psdr-cuda\build\lib\Release
D:\study\CG\download\psdr-cuda\build\lib

But I got error:ModuleNotFoundError: No module named 'enoki'when I tried to import enoki. How can I fix it?

andyyankai commented 2 years ago

Thats weird, did you find the enoki's .pyd file in enoki/python/enoki? Maybe you can try to add enoki/python/ to python path as well and see if it works Also, in windows make sure you follow this: https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html

JakeXin7 commented 2 years ago

Thanks for reply!

I can find 5 .pyd files in enoki/python/enoki. They are:

core.cp38-win_amd64.pyd
cuda.cp38-win_amd64.pyd
cuda_autodiff.cp38-win_amd64.pyd
dynamic.cp38-win_amd64.pyd
scalar.cp38-win_amd64.pyd

I tried to change the python path from enoki\python\enoki to enoki\python, and it worked. I can successfully import enoki.

But when I tried: from enoki.cuda_autodiff import Float32 as FloatD, Vector3f as Vector3fD, Matrix4f as Matrix4fD, Matrix3f I got error: ImportError: DLL load failed while importing cuda_autodiff What's wrong with it?

cococolorful commented 1 year ago

Thanks for reply!

I can find 5 .pyd files in enoki/python/enoki. They are:

core.cp38-win_amd64.pyd
cuda.cp38-win_amd64.pyd
cuda_autodiff.cp38-win_amd64.pyd
dynamic.cp38-win_amd64.pyd
scalar.cp38-win_amd64.pyd

I tried to change the python path from enoki\python\enoki to enoki\python, and it worked. I can successfully import enoki.

But when I tried: from enoki.cuda_autodiff import Float32 as FloatD, Vector3f as Vector3fD, Matrix4f as Matrix4fD, Matrix3f I got error: ImportError: DLL load failed while importing cuda_autodiff What's wrong with it?

https://www.cnblogs.com/wakuwaku/articles/16696921.html