简体   繁体   中英

Undefined symbol on torchvision import

pip install torch==0.4.1 -f https://download.pytorch.org/whl/cu100/stable

cat /usr/local/cuda/version.txt
CUDA Version 10.1.168

python -V
Python 3.5.2

python -c "import torch; print(torch.__version__)"
0.4.1

Get error on :

python -c "import torchvision; print(torchvision.__version__)"

    ...
    from torchvision import _C
    ImportError: /my_env/lib/python3.5/site-packages/torchvision/_C.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E

Versions:

pip freeze | grep torch
torch==0.4.1
torchfile==0.1.0
torchvision==0.3.0

I have tried:

pip install torchvision==0.4.1 --no-dependencies
Collecting torchvision==0.4.1
  ERROR: Could not find a version that satisfies the requirement torchvision==0.4.1 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.3.0)
ERROR: No matching distribution found for torchvision==0.4.1

How to install older version of torchvision?

似乎pip install torchvision==0.2.0 --no-deps --no-cache-dir帮助了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM