1

I'm trying to install tensorflow 1.14.0 on my Ubuntu (20.04 LTS) machine. I need the python version 2.7.

The cmd line I'm trying to execute is

$ sudo python2.7 -m pip install tensorflow==1.14.0

but it seems there is an issue with "grpcio". The output is the following one:

Collecting tensorflow==1.14.0
  Using cached tensorflow-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (109.2 MB)
Collecting backports.weakref>=1.0rc1
  Using cached backports.weakref-1.0.post1-py2.py3-none-any.whl (5.2 kB)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.1.2)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.16.0)
Collecting gast>=0.2.0
  Using cached gast-0.5.3.tar.gz (23 kB)
Collecting grpcio>=1.8.6
  Using cached grpcio-1.41.1.tar.gz (21.2 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0d4Nnx/grpcio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0d4Nnx/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zkUeEF
         cwd: /tmp/pip-install-0d4Nnx/grpcio/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-0d4Nnx/grpcio/setup.py", line 256, in <module>
        if check_linker_need_libatomic():
      File "/tmp/pip-install-0d4Nnx/grpcio/setup.py", line 206, in check_linker_need_libatomic
        stderr=PIPE)
      File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
        errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I have already tried to upgrade pip (20.3.4) and setuptools (44.1.1). I also tried to install grpcio from a repository by following this guide https://pypi.org/project/grpcio/, but I get the same error.

Do you have any suggestion? Thank you!

  • Try using `python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl`. Also check [this](https://computingforgeeks.com/install-tensorflow-cpu-only-on-ubuntu-debian/) reference. –  Jan 10 '22 at 16:32

1 Answers1

2

I had the same exat issue as you, upgrading pip wouldn't work in my case either.

I was able to install tensorboard on my platform by installing an older version of grpcio (in my case pip install grpcio==1.20.1).

You will see some warnings on execution about some missing dynamic libraries which are ok for me, but you might want to try other grpcio version.

JLG
  • 41
  • 3