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

no module named enclib_gpu #163

Closed
marshallwu1 opened this issue Dec 24, 2018 · 4 comments · Fixed by #305
Closed

no module named enclib_gpu #163

marshallwu1 opened this issue Dec 24, 2018 · 4 comments · Fixed by #305

Comments

@marshallwu1
Copy link

Hi,author. I have followed the instructions on your page. I installed PyTorch1.0 and do PIP INstall torch-encoding. Then I got your code by git clone, and run "python setup.py install" with no errors. But when I run "python scripts/prepare_pascal.py" or "import encoding", I got the error like this. It seems that the "enclib_gpu" cannot be built.

import encoding
Traceback (most recent call last):
File "", line 1, in
File "encoding/init.py", line 13, in
from . import nn, functions, parallel, utils, models, datasets, transforms
File "encoding/nn/init.py", line 12, in
from .encoding import *
File "encoding/nn/encoding.py", line 19, in
from ..functions import scaled_l2, aggregate, pairwise_cosine
File "encoding/functions/init.py", line 2, in
from .encoding import *
File "encoding/functions/encoding.py", line 14, in
from .. import lib
File "encoding/lib/init.py", line 27, in
build_directory=gpu_path, verbose=False)
File "/home/wmx4/anaconda3/envs/pytorch1.0/lib/python2.7/site-packages/torch/utils/cpp_extension.py", line 645, in load
is_python_module)
File "/home/wmx4/anaconda3/envs/pytorch1.0/lib/python2.7/site-packages/torch/utils/cpp_extension.py", line 825, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/home/wmx4/anaconda3/envs/pytorch1.0/lib/python2.7/site-packages/torch/utils/cpp_extension.py", line 964, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
ImportError: No module named enclib_gpu

The version of PyTorch is 1.0, python 2.7, cuda9.0, and I also installed ninja 1.8.2.

@henanjun
Copy link

same problem. The version of pytorch is 1.0, python 3.6, cuda 8.0, ninja 1.8.2. Ubuntu 16.04.5.
I am wondering if I need I try cuda 9.0

@zhanghang1989
Copy link
Owner

Please try using CUDA 9.2 and let me know if you still have the problem.

@henanjun
Copy link

Please try using CUDA 9.2 and let me know if you still have the problem.

Thank you very much. I solved the problem by re-installing CUDA 9.2.

@huanghoujing
Copy link

@marshallwu1 Do you still have problem with installation? I find it necessary to

  • install pytorch 1.0 from source. This is to avoid Segmentation Fault (core dumped) error, in my trial.
  • modify some include clauses of Pytorch-Encoding. This is learnt from this issue.

My installation guide is this and then this.

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

Successfully merging a pull request may close this issue.

4 participants