0

I'm trying to install tensorflow-gpu==1.7.0 in the docker image frolvlad/alpine-python2, using the command pip install tensorflow-gpu==1.7.0 but it seems like pip can't find it, I have tried with pip install tensorflow to install the latest but still no result. result of the command

i should mention that it works fine for pandas and numpy. I just wanna know if it has something to do the deprecation message, and is there anyway to solve this.

2
  • 1
    You seem to be using python 2, that is a bad idea and could be the cause of your problem (TensorFlow is not available in all python versions). Commented Mar 3, 2021 at 18:57
  • Yeah I know, but I have tried it in my local machine and it worked, and for the python version I need it to run a model. Commented Mar 3, 2021 at 20:39

1 Answer 1

1

Have a look for tensorflow-gpu==1.7.0 in pypi which you are looking for here, you could see the package meets the python2.7 requirement is tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl.

Unfortunately, the name cp27 means CPython, here I guess it's restricted to glibc, while alpine is using musl libc, if you download this wheel to your alpine container and have a install it will reports next error:

ERROR: tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.

So, if you are not limited to use alpine, you could use debian based container, e.g. python:2, then you could successfully find the package just like you did in your local host machine.

# pip install tensorflow-gpu==1.7.0
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tensorflow-gpu==1.7.0
  Downloading tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl (256.2 MB)

If stick on alpine, I guess you may need to build from source code by yourselves, and may results in a lots effort to conquer issues, may refers to this to have a luck.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer, I suspected that this may be the problem and that's what i was trying to do right now, I will finish the process and give you update.
i've used python:2 image and it worked; thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.