-
Notifications
You must be signed in to change notification settings - Fork 231
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
Torch Dependency Resolution problem in Pip #443
Comments
Hello @arky, thanks for reporting this. Is this on a fresh python environment or are you trying to install PytorchWildlife on an existing environment? We wonder if this is caused by some existing packages. |
@zhmiao Apologies, I have replicated this issue with 1) default system packages on ubuntu LTS 2) Under a fresh venv virtual envirnoment with Python (3.10.12) and Pip (24.0). |
Providing a conda based testcase for this issue $ conda -V
conda 23.11.0
# Test case
$ conda create -n pytwildlife
Retrieving notices: ...working... done
Channels:
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): | /-|/\|/done
Solving environment: done
## Package Plan ##
environment location: /home/arky/anaconda3/envs/pytwildlife
Proceed ([y]/n)? y
Invalid choice: source acy
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate pytwildlife
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate pytwildlife
$ pip install pytorchwildlife
Defaulting to user installation because normal site-packages is not writeable
Collecting pytorchwildlife
Downloading PytorchWildlife-1.0.2.4.tar.gz (30 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in ./.local/lib/python3.10/site-packages (from pytorchwildlife) (1.26.3)
INFO: pip is looking at multiple versions of pytorchwildlife to determine which version is compatible with other requirements. This could take a while.
Downloading PytorchWildlife-1.0.2.3.tar.gz (30 kB)
Preparing metadata (setup.py) ... done
Using cached PytorchWildlife-1.0.2.2-py3-none-any.whl.metadata (19 kB)
Using cached PytorchWildlife-1.0.1.1-py3-none-any.whl.metadata (18 kB)
Using cached PytorchWildlife-1.0.1-py3-none-any.whl.metadata (18 kB)
Using cached PytorchWildlife-1.0.0-py3-none-any.whl.metadata (4.2 kB)
Using cached PytorchWildlife-0.0.1.1.2-py3-none-any.whl.metadata (4.2 kB)
Using cached PytorchWildlife-0.0.1.1.1-py3-none-any.whl.metadata (2.5 kB)
INFO: pip is still looking at multiple versions of pytorchwildlife to determine which version is compatible with other requirements. This could take a while.
Using cached PytorchWildlife-0.0.1-py3-none-any.whl.metadata (2.5 kB)
Using cached PytorchWildlife-0.0.0-py3-none-any.whl.metadata (2.5 kB)
ERROR: Cannot install pytorchwildlife==0.0.0, pytorchwildlife==0.0.1, pytorchwildlife==0.0.1.1.1, pytorchwildlife==0.0.1.1.2, pytorchwildlife==1.0.0, pytorchwildlife==1.0.1, pytorchwildlife==1.0.1.1, pytorchwildlife==1.0.2.2, pytorchwildlife==1.0.2.3 and pytorchwildlife==1.0.2.4 because these package versions have conflicting dependencies.
The conflict is caused by:
pytorchwildlife 1.0.2.4 depends on torch==1.10.1
pytorchwildlife 1.0.2.3 depends on torch==1.10.1
pytorchwildlife 1.0.2.2 depends on torch==1.10.1
pytorchwildlife 1.0.1.1 depends on torch==1.10.1
pytorchwildlife 1.0.1 depends on torch==1.10.1
pytorchwildlife 1.0.0 depends on torch==1.10.1
pytorchwildlife 0.0.1.1.2 depends on torch==1.10.1
pytorchwildlife 0.0.1.1.1 depends on torch==1.10.1
pytorchwildlife 0.0.1 depends on torch==1.10.1
pytorchwildlife 0.0.0 depends on torch==1.10.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts |
Hi @arky! Thank you so much for sharing these details. Currently, PytorchWildlife requires Python 3.8 to work. Could you please run this command to create a Python 3.8 environment? It should solve the issue!
You can find a step-by-step guide in our installation instructions, please let us know if it works and if you have further questions. Thank you :) |
Hello, @aa-hernandez, I experienced the same dependancy conflict, using a fresh env with python=3.8. |
Hi @u17057842! Thank you for reporting this error with us. Could you please share the error message so we can find the source of the issue? Thank you :) |
Also @arky, I see the error is caused by torch==1.10.1. I wonder if you have a torch preinstalled with a different version? |
@zhmiao There is no pre-existing torch installation as this new virtual environment. I think @aa-hernandez might be right that the is relation to python version.
|
@aa-hernandez Conda seems to work now. But pip doesn't work
|
@arky, does it work on Python 3.10 in your conda environment? Generally it shouldn't because torch 1.10.1 does not support Python 3.10. The reason we use torch 1.10.1 is because YOLOv5 package has some functions that does not support higher versions of Pytorch. We are considering either create a customed YOLOv5 that solves this issue or replace it in future versions of Megadetector. But it is weird pip venv doesn't work. We never used pip venv before. |
Currently PytorchWildlife has dependency conflict on linux.
The text was updated successfully, but these errors were encountered: