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
Cannot import encoding #70
Comments
Please install ninja 1.8.2 by following the instructions https://www.claudiokuenzler.com/blog/756/install-newer-ninja-build-tools-ubuntu-14.04-trusty#.WxYrvFMvzJw |
I installed the ninja 1.8.2 by the instructions you mentioned, but got the same error @zhanghang1989. |
I have got the same error, and I changed ['ninja', '-v'] to ['ninja', '--v'],but the main error also exists, when I try "import encoding", I got error " ImportError: No module named 'enclib_cpu' ", it seems must have one of this |
Are you using the PyTorch master branch? |
@zhanghang1989 I am having the same issues described above. At first I had the I have ninja 1.8.2 installed. I pip-installed torch-encoding with no errors. Also tried installing via |
@vribeiro1 I have solved it using the PyTorch master branch, and the ['ninja', '-v'] should not be changed. |
I have successful installed pytorch 0.5 and ninja 1.8.2,however when I import encoding, there has also problems. `Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/encoding_kernel.cu(341): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/encoding_kernel.cu(364): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/encoding_kernel.cu(391): error: class "at::Context" has no member "getCurrentCUDAStream" 4 errors detected in the compilation of "/tmp/tmpxft_00005f49_00000000-6_encoding_kernel.cpp1.ii". /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/syncbn_kernel.cu(217): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/syncbn_kernel.cu(249): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/syncbn_kernel.cu(272): error: class "at::Context" has no member "getCurrentCUDAStream" 4 errors detected in the compilation of "/tmp/tmpxft_00005f4a_00000000-6_syncbn_kernel.cpp1.ii". /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/roi_align_kernel.cu(373): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/roi_align_kernel.cu(420): error: class "at::Context" has no member "getCurrentCUDAStream" /home/wuxinting/anaconda3/envs/pytorch-master/lib/python3.7/site-packages/encoding/lib/gpu/roi_align_kernel.cu(420): error: class "at::Context" has no member "getCurrentCUDAStream" 4 errors detected in the compilation of "/tmp/tmpxft_00005f4b_00000000-6_roi_align_kernel.cpp1.ii". |
Please install ninja 1.8.2 by following the instructions https://www.claudiokuenzler.com/blog/756/install-newer-ninja-build-tools-ubuntu-14.04-trusty#.WxYrvFMvzJw |
@zhanghang1989 Thank you for your reply, I tried in this way, but it doesn't work for me. The main problem for me is enclib_gpu cannot be installed, class "at::Context" has no member "getCurrentCUDAStream". Then I search for the sorece code in pytorch-master, finding that the API has been change to at::cuda::getCurrentCUDAStream, so I replace all the at::globalContext.getCurrentCUDAStream() to at::cuda::getCurrentCUDAStream and edd the header file #include "ATen/cuda/CUDAContext.h" , it is work for me. |
Thanks a lot @XindyTT ! I will update the repo in next release. |
use pytorch=0.4.1 will be ok. My python version is 3.6.7. |
This issue should have been fixed by previous PR. |
I'm also getting this error: ImportError: No module named 'enclib_cpu'. I did a source install from the Pytorch master branch and installed ninja 1.8.2 as per the link above. Any suggestions? |
Maybe it is related to this #140 (comment) |
i have met the same problem. i have try it on pytorch0.4.1 and pytorch1.0, and also rename torch.h to extension.h, but i still cannot solve it. if anyone solve it? |
Hello. What do you mean by using Pytroch master? Do I need uninstall the current Pytorch and install a new version? |
master is the branch of Pytorch in git. However, the API and variable may change if pytorch's version update. I tried the repo in June, where the master of pytorch is version 0.5. And now the version may be higher. |
I see. Thanks for your kind reply. |
hi,Could you tell me how you solved this problem?ubuntu==16.04,python==3.5,gcc==5.4.0 |
same problem with torchvision-0.5.0 pytorch-1.4.0 and ninjia 1.8.2 |
Hi, did you follow the instructions at https://hangzhang.org/PyTorch-Encoding/notes/compile.html I suggest using the latest anaconda with CUDA 10.0 on ubuntu 16.04. |
it doesn't work ,i have tried No module named 'enclib_gpu' @zhanghang1989 |
do you have saved this problem? @OasisYang |
i also meet this problem,have you solved it |
what's the mean of PR @zhanghang1989 |
me too |
it doesn't work |
Please use pytorch 1.4.0. PyTorch 1.5 is not supported yet. |
I am facing an issue like this during my installation of Pytorch_Encoding. I am trying to run this module in Windows. And I am using Anaconda for this purpose. Could someone of you please give me a detailed set of instructions as to how I properly install it and resolve the issue that I captured below: This is the error I am getting for the installation: INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. The conflict is caused by: To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies |
Please uninstall all the existing versions |
Hey thanks, I have sorted out that issue. But, at the moment, I am trying to train the model with cpu. I could not do it with pip install method. Because it throws some big chunk of error: I have scoured through the whole error lines and found the place where it makes an issue. This following is the issue: can you please help me get through this error? |
I haven't used window system. Could you try using the docker option? https://hangzhang.org/PyTorch-Encoding/notes/compile.html#using-docker |
Hi, I can run "python setup.py install" with no errors, but when i try to "import encoding". I got the error like this. Could you help me with that, thanks.
The text was updated successfully, but these errors were encountered: