Open rookiecm opened 6 years ago
environment: Ubuntu 14.04 Pytorch 1.0 cuda 8.0.61 cuDNN 6.0.21
Hi,
This generally happens when your PyTorch installation is not the same as the one you used to build maskrcnn-benchmark
.
Try doing the following:
import torch
print(torch.__version__)
and see if it is indeed a 1.0 release of PyTorch.
Also, please copy and paste the output from the environment collection script from PyTorch (or fill out the checklist below manually).
You can get the script and run it with:
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
conda
, pip
, source):Thank you. Actually, I create a new environment using conda and install pytorch just following the instruction in the INSTALL.md. I used to use pytorch0.4.1. But when I try to print the version of pytorch, I got the same mistake.
Do you mean that you are obtaining 0.4.1
when you do print(torch.__version__)
?
If that's the case, then there is a conflict in your environment.
Sorry, I didn’t express it clearly. I got the same mistake as I posted when I do print(torch.__version__)
in the environment of pytorch1.0.
Can you try uninstalling maskcnn-benchmark
and install it again? Don't forget to rm -rf build/
folder.
Also, what is the output of print(torch.__version__)
, it gives the date as well if it's 1.0, so that I check if there is a bug in that particular version of pytorch
When I try to import torch, here comes the following errors:
Traceback (most recent call last):
File "
You seem to have an old pytorch installation laying around that is mixing up symbols, see that you have two anacondas,
/home/caomeng/anaconda3/
and
/home/caomeng/anaconda2/
And one is picking files from the other.
Sorry for replying late. I have removed Anaconda3. However, I still got errors as follows when I try to import torch.
Traceback (most recent call last):
File "
that looks like a bugged install, where probably your anaconda2 was depending on anaconda3?
❓ Questions and Help
When I execute the command 'python setup.py build develop' in the Installation.md. I got the following mistakes: Traceback (most recent call last): File "setup.py", line 7, in
import torch
File "/home/caomeng/anaconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/init.py", line 84, in
from torch._C import
ImportError: /home/caomeng/anaconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/lib/libtorch.so.1: undefined symbol: _ZTIN2at10TensorImplE
(maskrcnn_benchmark) caomeng@adsplab-vision:~/github/maskrcnn-benchmark$ python setup.py build develop
Traceback (most recent call last):
File "setup.py", line 7, in
import torch
File "/home/caomeng/anaconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/init.py", line 84, in
from torch._C import
ImportError: /home/caomeng/anaconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/lib/libtorch.so.1: undefined symbol: _ZTIN2at10TensorImplE