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

conflict numpy version between tensorflow and tf-nighty #47422

Closed
hoaquocphan opened this issue Feb 26, 2021 · 3 comments
Closed

conflict numpy version between tensorflow and tf-nighty #47422

hoaquocphan opened this issue Feb 26, 2021 · 3 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author TF 2.5 Issues related to TF 2.5 type:build/install Build and install issues

Comments

@hoaquocphan
Copy link

When I install tf-nighty as below command:
pip3 install tf-nightly

the error appear as below:

Requirement already satisfied: zipp>=0.5 in /home/hoaphan/.local/lib/python3.6/site-packages (from importlib-metadata->markdown>=2.6.8->tb-nightly~=2.4.0.a->tf-nightly) (3.4.0)
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.18.5
    Uninstalling numpy-1.18.5:
      Successfully uninstalled numpy-1.18.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.3.1 requires numpy<1.19.0,>=1.16.0, but you have numpy 1.19.5 which is incompatible.
Successfully installed numpy-1.19.5

this mean:
the tensorflow requires numpy <1.19.0
but the tf-nighty requires numpy 1.19.5

so I cannot install tensorflow and tf-nighty at same time,
so please help me solve this issue.

@amahendrakar
Copy link
Contributor

amahendrakar commented Feb 27, 2021

@hoaquocphan,
TF v2.3.2 requires numpy >= 1.16.0, < 1.19.0, whereas for TF v2.4 and the latest TF-nightly the required version is numpy~=1.19.2.

In this case, I'd suggest you to install numpy v1.19.2, as it is compatible with the latest stable version of TensorFlow i.e. v2.4.1.

so I cannot install tensorflow and tf-nighty at same time,

Also, you can only import any one release of TensorFlow in the script. So, I'd recommend using separate virtual environments for each version.

Thanks!

@amahendrakar amahendrakar added stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 type:build/install Build and install issues TF 2.5 Issues related to TF 2.5 and removed type:bug Bug TF 2.3 Issues related to TF 2.3 labels Feb 27, 2021
@mihaimaruseac
Copy link
Collaborator

Since tf-nightly and tensorflow use the same code, you should never install both in the same environment. Usually, the latest one overrides most of the other. This is the way pip works and TF can do nothing in this case. That's why you should use venv/virtualenv.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author TF 2.5 Issues related to TF 2.5 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

3 participants