导入torchvision时出现未定义符号

3
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

最初的回答:

我已经尝试过:

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

如何安装旧版本的torchvision?

1个回答

2
似乎 pip install torchvision==0.2.0 --no-deps --no-cache-dir 起到了作用。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接