-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
No module named 'pyngp' #43
Comments
I have the same problem. |
Please check your CMake/build logs for whether Python was detected and If CMake can't detect your Python installation, it will only build the |
to expand on this a little in case it helps you understand the root cause (tho the advice Tom94 gives is the right thing to actually take action on) - the python binding relies on there being a file with a filename something like so - all these files (the pyd and the cublas dlls) must be in your path. but... how do they get there? the error you are seeing is basically that python cannot find these files in your path, and the code in common.py is failing to add a useful directory somehow. perhaps the files are not there, or not in the build/ folder, or perhaps you are running a different version of python than the one that was built against. I have seen a windows setup where running 'python' ran (say) 3.9, but cmake had built instant-ngp against (say) 3.7 or 3.8. it may be worth checking what version of python you are running run.py through, vs what verision is in the filename of the .pyd file. |
Hi, the built python lib is in your build directory.
Replace the |
My file name is called pyngp.cp310-win_amd64 which made me believe it's for python 3.10. But when updating to python 3.10 all kinds of other modules break and I think it would be easier to build a 3.9 version of pyngp. But I have no clue how to do that. |
@624memorials I had exactly the same issue. I resolved it by doing the following. First, I followed MiZhenxing's advice by adding the following code to the 'run.py' file:
I then installed python version 3.10 into the virtual environment
This will ask you for confirmation that it will automatically update or downgrade various packages. This should hopefully work for you. Happy coding! |
I had this problem and realised it was because I installed Python after I had already run the make. Now python is there, I will redo the make, and I suspect it will work. |
i've been fighting with this problem all bloody day ;p .. i finally figure it out.. i just renamed pyngp.cp39-win_amd64.pyd (or whatever yours is called) to pyngp.pyd and it worked |
I also had this issue, documenting what worked for me here in case it helps others. I'm on Windows, and had run the cmake commands in a Developer powershell, but was running my python in an Anaconda shell inside an Anaconda environment. This meant that the python that cmake saw and the python that the scripts saw was different, and so it couldn't find pyngp. To fix this, I first set up the Developer powershell to use conda. In the shell, I went to my conda install directory (C:\Users<usnerame>\anaconda3\condabin) and ran Next, I removed my old build folder. I had previously tried just running cmake again, but that didn't fix it. I needed to remove build, and re-run cmake from scratch within the conda environment. After doing this, all my pythons were in agreement, and I could import pyngp without issue. |
To add to the post above – I simply opened a new Developer powershell and rebuilt the library ( |
command to execute |
I followed this instruction, but I got this: "ImportError: DLL load failed while importing pyngp: the given module is not found." |
Change the python version (here from 3. 7 in the download ) in the cmakelist file to the your environment python version (3.10 in my PC). then cmake and build again. Then it works if (NGP_BUILD_WITH_PYTHON_BINDINGS) |
If someone else is wondering how to install Instant-NGP with a specific Python version (other than the currently activated version), it can be done by adding the following flags to the build command:
|
Personnally, I struggled with this error for a day and I could run scripts/run.py changing "/path/to/python" in build/CMakeCache.txt by my current path to python. I work with conda and it seems to work now. |
I got the following error (pinerf) user@5a94046bed44:/workspace/pose_estimation/ParallelInversion/scripts$ python run_debug.py --config config/debug/default.yaml And solved it by this:
|
Missing In run.py
The text was updated successfully, but these errors were encountered: