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

Can't find tensorflow 2.1.0 with python 3.7 and pip #37316

Closed
maurera opened this issue Mar 4, 2020 · 7 comments
Closed

Can't find tensorflow 2.1.0 with python 3.7 and pip #37316

maurera opened this issue Mar 4, 2020 · 7 comments
Assignees
Labels
subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues

Comments

@maurera
Copy link

maurera commented Mar 4, 2020

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version: 2.1.0
  • Python version: 3.7
  • Installed using virtualenv? pip? conda?: pip
  • CUDA/cuDNN version: 10.1
  • GPU model and memory: Unknown

Describe the problem
I have a Docker file that is being built to run on a GPU machine in AWS. When I try to pip install tensorflow 2.1.0 I get the error:

No matching distribution found for tensorflow==2.1.0

Provide the exact sequence of commands / steps that you executed before running into the problem
My Docker file is as follows:

FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04

RUN apt -qq -y update \
	&& apt -qq -y upgrade
RUN apt -y install python3.7
RUN apt -y install python3-pip

RUN which python3.7
RUN which pip3

RUN ln -s /usr/bin/python3.7 /usr/bin/python
RUN ln -s /usr/bin/pip3 /usr/bin/pip
RUN python --version
RUN which pip

WORKDIR /usr/src/app
COPY . .
RUN pip3 install tensorflow==2.1.0
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
CMD ["python", "test.py"]

Any other info / logs
The full error is:

Collecting tensorflow==2.1.0
Could not find a version that satisfies the requirement tensorflow==2.1.0 (from -r requirements.txt (line 4)) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==2.1.0 (from -r requirements.txt (line 4))
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

@maurera maurera added the type:build/install Build and install issues label Mar 4, 2020
@loricrotser
Copy link

I am seeing a similar error in the "tensorflow/tensorflow/lite/micro/examples/micro_speech/train_speech_model.ipynb" example - running this in the google notebook gives me the following error:

ERROR: Could not find a version that satisfies the requirement tf-nightly-gpu==1.15.0.dev20190729 (from versions: 2.2.0.dev20200201, 2.2.0.dev20200202, 2.2.0.dev20200203, 2.2.0.dev20200204, 2.2.0.dev20200205, 2.2.0.dev20200206, 2.2.0.dev20200207, 2.2.0.dev20200208, 2.2.0.dev20200210, 2.2.0.dev20200211, 2.2.0.dev20200212, 2.2.0.dev20200215, 2.2.0.dev20200216, 2.2.0.dev20200217, 2.2.0.dev20200218, 2.2.0.dev20200226, 2.2.0.dev20200227, 2.2.0.dev20200228, 2.2.0.dev20200229, 2.2.0.dev20200301, 2.2.0.dev20200302, 2.2.0.dev20200303, 2.2.0.dev20200304)
ERROR: No matching distribution found for tf-nightly-gpu==1.15.0.dev20190729

This was working as of a week ago.

@maurera
Copy link
Author

maurera commented Mar 4, 2020

I think I've found a workaround, adding the line RUN python3.7 -m pip install --upgrade pip.

Is this workflow recommended or is there a better solution?

Working Docker file:

FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04

RUN apt -qq -y update \
	&& apt -qq -y upgrade
RUN apt -y install python3.7
RUN apt -y install python3-pip
RUN python3.7 -m pip install --upgrade pip

RUN which python3.7
RUN which pip3

RUN ln -s /usr/bin/python3.7 /usr/bin/python
RUN ln -s /usr/bin/pip3 /usr/bin/pip
RUN python --version
RUN which pip

WORKDIR /usr/src/app
COPY . .
RUN pip3 install tensorflow==2.1.0
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
CMD ["python", "test.py"]

@amahendrakar
Copy link
Contributor

@maurera,
As per the documentation TensorFlow 2 packages require a pip version >19.0.

Please check this comment from a similar issue and let us know if it works. Thanks!

@amahendrakar amahendrakar added subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.1 for tracking issues in 2.1 release stat:awaiting response Status - Awaiting response from author labels Mar 5, 2020
@mihaimaruseac
Copy link
Collaborator

RUN python3.7 -m pip install --upgrade pip is indeed the right solution. Can you please make a PR to add it to the dockerfiles?

@maurera
Copy link
Author

maurera commented Mar 5, 2020

@amahendrakar - yes, this works. See my comment from yesterday

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Mar 7, 2020
@amahendrakar
Copy link
Contributor

@maurera,
Is this still an issue. Please feel free to close the issue if resolved. Thanks!

@maurera maurera closed this as completed Mar 16, 2020
@tensorflow-bot
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
subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants