pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.53k stars 3.03k forks source link

Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies. #9811

Open pifparfait opened 3 years ago

pifparfait commented 3 years ago

Description

I need to install tensorflow 2.3.1 but I got his message. Any help? !pip install -U tensorflow==2.3.1 pip3 install -U tensorflow install -U tensorflow==2.3.1 Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: tensorflow in /home/pi/.local/lib/python3.7/site-packages (0.11.0) Collecting install Using cached https://www.piwheels.org/simple/install/install-1.3.4-py3-none-any.whl (3.1 kB) ERROR: Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies.

The conflict is caused by: The user requested tensorflow The user requested tensorflow==2.3.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/user_guide/#fixing-conflicting-dependencies

Expected behavior

No response

pip version

(21.0.1)

Python version

Python 3.7.3

OS

MAC

How to Reproduce

pip3 install -U tensorflow install -U tensorflow==2.3.1

Output

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: tensorflow in /home/pi/.local/lib/python3.7/site-packages (0.11.0)
Collecting install
  Using cached https://www.piwheels.org/simple/install/install-1.3.4-py3-none-any.whl (3.1 kB)
ERROR: Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested tensorflow
    The user requested tensorflow==2.3.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/user_guide/#fixing-conflicting-dependencies

Code of Conduct

webknjaz commented 2 years ago

@pifparfait have you checked if https://www.piwheels.org/simple/install/install-1.3.4-py3-none-any.whl has python_requires matching your current Python interpreter? This may be similar to https://github.com/pypa/pip/issues/11321.

pip3 install -U tensorflow install -U tensorflow==2.3.1

This reproducer command is weird. You probably didn't mean to include that second install -U — with that in your command, pip attempts to install a package called install (which is also visible in your log).