Setting up the environment in 2021
dzy1997 opened this issue · 9 comments
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!
Python version should not be an issue. So, python 3.7 is fine.
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?
Could you first create a python environment and then install Pytorch?
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`
It is really weird. Could you try a different python version? I used Python 3.6.
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.
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?
It is possible. You might extract the offsets and weights of each deformable conv layer and feed them to torchvision.ops.deform_conv.
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.