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

ImportError: torch.utils.ffi is deprecated...... #19

Open
mengyahuUSTC-PU opened this issue May 25, 2020 · 0 comments
Open

ImportError: torch.utils.ffi is deprecated...... #19

mengyahuUSTC-PU opened this issue May 25, 2020 · 0 comments

Comments

@mengyahuUSTC-PU
Copy link

Hi all,

I met this problem and I have solved it by myself. I recorded here and hope it can help future users.

My PC uses Ubuntu 18.04. After installing the environment and downloading data, I got ' ImportError: torch.utils.ffi is deprecated... ' when running the main.py.

Possible cause: pytorch is 1.3 rather than 0.4.

Using conda list in the environment, I see pytorch is version 0.4. However, if I use python to import torch and print its version, it is 1.3!!!!

Long story short->
My guess: It seems that the pytorch install during 'conda env create -f environment.yml' has a name 0.4 but is actually 1.3.
My Solution: manually downloading from https://download.pytorch.org/whl/torch_stable.html and then install with pip under the virtual environment.

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

1 participant