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

Getting ImportError: No module named cuda.load_textures #20

Open
akashdexati opened this issue Oct 4, 2019 · 3 comments
Open

Getting ImportError: No module named cuda.load_textures #20

akashdexati opened this issue Oct 4, 2019 · 3 comments

Comments

@akashdexati
Copy link

Hi @StevenLiuWen @piaozhx @ak9250
I followed the exact steps mentioned in README.md
On running <demo_swap.py> it runs into "ImportError: No module named cuda.load_textures"

akash@my-open-source-machine:~/impersonator$ python demo_swap.py 
Traceback (most recent call last):
  File "demo_swap.py", line 5, in <module>
    from models.swapper import Swapper
  File "/home/ubuntu/impersonator/models/swapper.py", line 7, in <module>
    from utils.nmr import SMPLRenderer
  File "/home/ubuntu/impersonator/utils/nmr.py", line 6, in <module>
    import neural_renderer as nr
  File "build/bdist.linux-x86_64/egg/neural_renderer/__init__.py", line 3, in <module>
  File "build/bdist.linux-x86_64/egg/neural_renderer/load_obj.py", line 9, in <module>
ImportError: No module named cuda.load_textures

I have referred daniilidis-group/neural_renderer#17
But in my case there is only one neural_renderer.

Can you please guide me on the issue.
Thanks

@TheCompAce
Copy link

TheCompAce commented Mar 15, 2020

akashdexati,

I have spent all day trying to get this to work. Like you I only have one neural_renderer. I created a new Environment with Python 3.6, and got everything setup (I also needed the Nvidia CUDA toolkit)

But now I am stuck with this error. (I tried the latest github of "neural_renderer" but that didn't compile like this one did.)

Any help with this would be great, I am on Windows 7.

EDIT:
I decided to install tensorflow-gpu instead of tensorflow.
ran "conda uninstall tensorflow"
ran "conda install tensorflow-gpu"

So now I'm getting
"File "h5py\h5.pyx", line 1, in init h5py.h5"
"ImportError: DLL load failed: The specified procedure could not be found."

so I ran "pip uninstall h5py" (I had to run it twice, for duplicate versions)
ran "conda uninstall h5py" (now my env should be clean of h6py)
rand "conda install h5py"

This fixed the h5py error.

But when I tried the demo again, so it seems that it wasn't tensorflow causing it.
"import neural_renderer.cuda.load_textures as load_textures_cuda"

@yeetan
Copy link

yeetan commented Mar 18, 2020

goto the directory of neural_renderer\neural_renderer, then run the python

import neural_renderer.cuda.load_textures as load_textures_cuda
it works,
but when I got to the root directory of neural_renderer, it displays the error again,

@DavisDDD
Copy link

I had the same problem, I'm using pycharm. The problem is beacause the import package can't be in the same path with the demo.py. My solution is copy the /neural_renderer to another path, then add it as an external lib.

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

4 participants