Skip to content

pip install error on TensorFlow #78

Open

Description

@PeterKW

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?

Activity

  1. allo- commented on Oct 19, 2021

    @allo-
    Owner

    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).

  2. PeterKW commented on Oct 29, 2021

    @PeterKW
    Author

    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

  3. PeterKW commented on Oct 29, 2021

    @PeterKW
    Author

    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
    
  4. allo- commented on Oct 29, 2021

    @allo-
    Owner

    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).

  5. atisDu commented on Nov 1, 2021

    @atisDu

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

  6. allo- commented on Nov 1, 2021

    @allo-
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions