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

Setting up the environment in 2021 #46

Open
dzy1997 opened this issue Feb 13, 2021 · 9 comments
Open

Setting up the environment in 2021 #46

dzy1997 opened this issue Feb 13, 2021 · 9 comments

Comments

@dzy1997
Copy link

dzy1997 commented Feb 13, 2021

I am trying to run TDAN for the baseline of a competition, but has some problem setting up the environment.
I tried to create an environment in conda: conda create -n tdan python=3.6 pytorch=0.3.1
but got the following error:
`UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package python conflicts for:
pytorch=0.3.1 -> cffi -> python[version='>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
pytorch=0.3.1 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
python=3.6`
It seems that cffi only works with python 3.7+. Is there a way I can work around this? Any help is appreciated!

@YapengTian
Copy link
Owner

Python version should not be an issue. So, python 3.7 is fine.

@dzy1997
Copy link
Author

dzy1997 commented Feb 18, 2021

I tried for several times but installing pytorch 0.3.1 in a python 3.7 (anaconda) environment would just fail. Can you share your channel choice for installing python packages?

@YapengTian
Copy link
Owner

Could you first create a python environment and then install Pytorch?

@dzy1997
Copy link
Author

dzy1997 commented Feb 19, 2021

Yes that's what I've tried. I first created an (conda) environment with python 3.7 then tried to install pytorch 0.3.1. It didn't work. Here's part of the output:
`UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • pytorch=0.3.1 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']

Your python: python=3.7`

@YapengTian
Copy link
Owner

It is really weird. Could you try a different python version? I used Python 3.6.

@dzy1997
Copy link
Author

dzy1997 commented Feb 19, 2021

Ok so I tried to create a new environment with Python 3.6 and install Pytorch 0.3.1. It gave me the following message:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • pytorch=0.3.1 -> python[version='>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']

Your python: python=3.6

It seems that under conda environment some part of pytorch0.3.1 (probably cffi, see my first post) requires python 3.7+, while some other part does not work with python 3.7.

@dzy1997
Copy link
Author

dzy1997 commented Feb 23, 2021

Update: I managed to modify model.py to use the official DCN implementation (torchvision.ops.deform_conv) and get rid of the ffi dependency. However when I try to load model/model.pt, ffi is still required. Is there a way one could modify the key names in the state dict of model.pt file to match with the official DCN implementation?

@YapengTian
Copy link
Owner

It is possible. You might extract the offsets and weights of each deformable conv layer and feed them to torchvision.ops.deform_conv.

@Ceeeeeeeeb
Copy link

Ok so I tried to create a new environment with Python 3.6 and install Pytorch 0.3.1. It gave me the following message:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • pytorch=0.3.1 -> python[version='>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']

Your python: python=3.6

It seems that under conda environment some part of pytorch0.3.1 (probably cffi, see my first post) requires python 3.7+, while some other part does not work with python 3.7.

Hey man,I think maybe you should try installing use the whl file,I'd like to show you my choice,click this page:"https://download.pytorch.org/whl/cu90/torch_stable.html"and choose the proper whl file you need.

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