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

pip install error on TensorFlow #78

Open
PeterKW opened this issue Oct 19, 2021 · 6 comments
Open

pip install error on TensorFlow #78

PeterKW opened this issue Oct 19, 2021 · 6 comments
Labels
question Further information is requested

Comments

@PeterKW
Copy link

PeterKW commented Oct 19, 2021

pip install -r requirements.txt
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Anything I should try to fix this?

@allo-
Copy link
Owner

allo- commented Oct 19, 2021

You probably use a python versions that is (no longer) supported by tensorflow.

You may try to find which tensorflow / tensorflow-gpu / tensorflow-cpu / tensorflow-nightly packages may be available. I suppose its something like you're still using python2 and trying to install tensorflow, which only provides python3 packages (like almost every package by now).

@allo- allo- added the question Further information is requested label Oct 19, 2021
@PeterKW
Copy link
Author

PeterKW commented Oct 29, 2021

Thank you, in the end it had to specify to use python3 ->

python3.9 -m pip install tensorflow

python3.9 -m pip install -r requirements.txt

@PeterKW
Copy link
Author

PeterKW commented Oct 29, 2021

Any ideas on how to fix the dependency conflicts?

I tried : python3 -m pip install -I numpy==1.19.3 but it didn't seem to help?

python3 -m pip install -r requirements.txt

Collecting tensorflow
  Using cached tensorflow-2.5.0-cp39-cp39-win_amd64.whl (422.6 MB)
INFO: pip is looking at multiple versions of tfjs-graph-converter to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 1), numpy==1.18.5 and tensorflow==2.6.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.18.5
    tensorflow 2.6.0 depends on numpy~=1.19.2
    The user requested numpy==1.18.5
    tensorflow 2.5.1 depends on numpy~=1.19.2
    The user requested numpy==1.18.5
    tensorflow 2.5.0 depends on numpy~=1.19.2

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

@allo-
Copy link
Owner

allo- commented Oct 29, 2021

Try to just install the latest versions. The versions in requirements.txt are tested, but using at least a more recent numpy should be no problem (not so sure for tensorflow, which seems to change more often).

@atisDu
Copy link

atisDu commented Nov 1, 2021

Just comment out the numpy line in requirements.txt and tensorflow will automatically pull in the right numpy.

@allo-
Copy link
Owner

allo- commented Nov 1, 2021

I wonder if we should have numpy only as indirect dependency. The project uses it directly, but I guess both tensorflow and mediapipe will always pull a compatible version in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants