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

I installed the version 0.0.8 successfully, but got an import error. #37

Closed
fangruizhu opened this issue Feb 4, 2020 · 4 comments
Closed

Comments

@fangruizhu
Copy link

I use the following command to install the package.
pip install spatial-correlation-sampler==0.0.8
And got the success message:
Processing ./.cache/pip/wheels/38/3b/a9/f9d27368124ec8ef31c510fdfd7e36739daa191f1015230a7d/spatial_correlation_sampler-0.0.8-cp37-cp37m-linux_x86_64.whl Requirement already satisfied: torch>=0.4.1 in ./anaconda3/envs/corrflow/lib/python3.7/site-packages (from spatial-correlation-sampler==0.0.8) (1.1.0) Requirement already satisfied: numpy in ./anaconda3/envs/corrflow/lib/python3.7/site-packages (from spatial-correlation-sampler==0.0.8) (1.17.5) Installing collected packages: spatial-correlation-sampler Successfully installed spatial-correlation-sampler-0.0.8

But when I try to import the package, I got the following error.

import torch
import spatial_correlation_sampler
Traceback (most recent call last):
File "", line 1, in
File "/remote-home/zhufangrui18210980021/anaconda3/envs/corrflow/lib/python3.7/site-packages/spatial_correlation_sampler/init.py", line 1, in
from .spatial_correlation_sampler import SpatialCorrelationSampler, SpatialCorrelationSamplerFunction, spatial_correlation_sample
File "/remote-home/zhufangrui18210980021/anaconda3/envs/corrflow/lib/python3.7/site-packages/spatial_correlation_sampler/spatial_correlation_sampler.py", line 6, in
import spatial_correlation_sampler_backend as correlation
ImportError: /remote-home/zhufangrui18210980021/anaconda3/envs/corrflow/lib/python3.7/site-packages/spatial_correlation_sampler_backend.cpython-37m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd

My environment settings are:

  • gcc: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
  • torch: 1.1.0
  • CUDA: 9.0, V9.0.176
  • python: 3.7

Could anyone help me to check what's wrong with it?
Thank you !!!

@fangruizhu
Copy link
Author

I've solved this by changing the file spatial_correlation_sampler_backend.cpython-37m-x86_64-linux-gnu.so. And this setting is work for using spatial correlation sampler(version 0.0.8) :)

@SuhongWang
Copy link

I've solved this by changing the file spatial_correlation_sampler_backend.cpython-37m-x86_64-linux-gnu.so. And this setting is work for using spatial correlation sampler(version 0.0.8) :)

May I ask how to change the file? I'm facing the same problem.

@ClementPinard
Copy link
Owner

You should try to install directly from source with python setup.py install . You may have a clearer log.

@SuhongWang
Copy link

You should try to install directly from source with python setup.py install . You may have a clearer log.

Thanks for your reply!
I have solved this by reinstall pytorch 1.3.0 with CUDA10.1.

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

3 participants