tensorflow: Install instructions fail, error message simply repeats install instructions.

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 20.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: no
  • TensorFlow installed from (source or binary): pip?
  • TensorFlow version: Whatever the default is?
  • Python version: 3.7.7
  • Installed using virtualenv? pip? conda?: Using pip supplied by conda environment (i.e. ~/anaconda3/envs/myenv/bin/pip/)
  • Bazel version (if compiling from source): No idea
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version:Doesn’t seem to be relevant to this issue, but 11.0
  • GPU model and memory: RTX 3080

Describe the problem Trying to follow install instructions for NVIDIA tensorflow via pip (& pyindex) posted at https://github.com/NVIDIA/tensorflow#install results in an error message telling me " This package can be installed as:…" (Re-)Running those commands produces the same error message again.

Provide the exact sequence of commands / steps that you executed before running into the problem Please refer to the log below.

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

$ pip install --user nvidia-pyindex
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-pyindex
  Downloading nvidia-pyindex-1.0.6.tar.gz (6.7 kB)
Building wheels for collected packages: nvidia-pyindex
  Building wheel for nvidia-pyindex (setup.py) ... done
  Created wheel for nvidia-pyindex: filename=nvidia_pyindex-1.0.6-py3-none-any.whl size=4171 sha256=692df4078194418f4812516403399f2e96373ad780b93c98ce944b5f02efb35d
  Stored in directory: /tmp/pip-ephem-wheel-cache-kpx26e3z/wheels/52/31/c8/db9f8939a8bb1f3500ce81b630604cbfa6e31f82c8f1bd914d
Successfully built nvidia-pyindex
Installing collected packages: nvidia-pyindex
Successfully installed nvidia-pyindex-1.0.6

$ pip install --user nvidia-tensorflow[horovod]
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-tensorflow[horovod]
  Downloading nvidia-tensorflow-0.0.1.dev4.tar.gz (3.8 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/shawley/anaconda3/envs/spnet/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yv_vnm57/nvidia-tensorflow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yv_vnm57/nvidia-tensorflow/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-1hvhhg4h
         cwd: /tmp/pip-install-yv_vnm57/nvidia-tensorflow/
    Complete output (17 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yv_vnm57/nvidia-tensorflow/setup.py", line 150, in <module>
        raise RuntimeError(open("ERROR.txt", "r").read())
    RuntimeError:
    ###########################################################################################
    The package you are trying to install is only a placeholder project on PyPI.org repository.
    This package is hosted on NVIDIA Python Package Index.
    
    This package can be installed as:
    ```
    $ pip install nvidia-pyindex
    $ pip install nvidia-tensorflow
    ```
    
    Please refer to NVIDIA instructions: https://github.com/NVIDIA/tensorflow#install.
    ###########################################################################################
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Ok, so let’s copy exactly from This package can be installed as:

$ pip install nvidia-pyindex
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: nvidia-pyindex in /home/shawley/.local/lib/python3.7/site-packages (1.0.6)

$ pip install nvidia-tensorflow
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-tensorflow
  Downloading nvidia-tensorflow-0.0.1.dev4.tar.gz (3.8 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/shawley/anaconda3/envs/spnet/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ayitiyj8/nvidia-tensorflow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ayitiyj8/nvidia-tensorflow/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-v8gqo1_p
         cwd: /tmp/pip-install-ayitiyj8/nvidia-tensorflow/
    Complete output (17 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ayitiyj8/nvidia-tensorflow/setup.py", line 150, in <module>
        raise RuntimeError(open("ERROR.txt", "r").read())
    RuntimeError:
    ###########################################################################################
    The package you are trying to install is only a placeholder project on PyPI.org repository.
    This package is hosted on NVIDIA Python Package Index.
    
    This package can be installed as:
    ```
    $ pip install nvidia-pyindex
    $ pip install nvidia-tensorflow
    ```
    
    Please refer to NVIDIA instructions: https://github.com/NVIDIA/tensorflow#install.
    ###########################################################################################
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Referring to https://github.com/NVIDIA/tensorflow#install is what originally got me to this point, so… Not sure what to do next. Any help?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 15 (3 by maintainers)

Most upvoted comments

I’m pretty sure the error comes from Anaconda. Can you try the following for me:

pip install --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com nvidia-tensorflow

The objective of the package you try nvidia-pyindex and that fails, install the nvidia python package repository to avoid having to write this complex command. So if it doesn’t work, you can go around it like that.

If you are using a docker container, can you please send me the docker container name ? I’d like to be able to reproduce it. Thanks

Thanks for your reply. Looks like I get the same error message:

$ pip install --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com nvidia-tensorflow
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com, https://pypi.ngc.nvidia.com
Collecting nvidia-tensorflow
  Downloading nvidia-tensorflow-0.0.1.dev4.tar.gz (3.8 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/shawley/anaconda3/envs/spnet/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vd7fm7lc/nvidia-tensorflow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vd7fm7lc/nvidia-tensorflow/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-ir6r10an
         cwd: /tmp/pip-install-vd7fm7lc/nvidia-tensorflow/
    Complete output (17 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-vd7fm7lc/nvidia-tensorflow/setup.py", line 150, in <module>
        raise RuntimeError(open("ERROR.txt", "r").read())
    RuntimeError:
    ###########################################################################################
    The package you are trying to install is only a placeholder project on PyPI.org repository.
    This package is hosted on NVIDIA Python Package Index.
    
    This package can be installed as:
    ```
    $ pip install nvidia-pyindex
    $ pip install nvidia-tensorflow
    ```
    
    Please refer to NVIDIA instructions: https://github.com/NVIDIA/tensorflow#install.
    ###########################################################################################
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I’m able to install other packages via conda’s pip, just not this package.

I tried deactivating the conda environment and starting a clean virtualenv environment, but am having other, more general, problems with pip supplied in the venv.

Hi, thanks for allowing us to know that nvidia-tensorflow is only working with python3.8. Save my time a lot . Following this instruction , I did not see that requirement in the webpage. I would suggest that maybe the webpage can indicate this in the pre-requirement section.

Ok problem now resolved. Had a couple issues along the way that I will post here for future users who may have similar issues:

With python 3.8 & venv/pip I was getting a different error.

$ python3.8 -m venv env_spnet
$ source env_spnet/bin/activate
(env_spnet) $ pip install --user nvidia-pyindex
Exception:
Traceback (most recent call last):
  File "/home/shawley/env_spnet/lib/python3.8/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/shawley/env_spnet/lib/python3.8/site-packages/pip/commands/install.py", line 290, in run
    with self._build_session(options) as session:
  File "/home/shawley/env_spnet/lib/python3.8/site-packages/pip/basecommand.py", line 68, in _build_session
    normalize_path(os.path.join(options.cache_dir, "http"))
  File "/usr/lib/python3.8/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not in

The problem here was that the pip installed by default on Ubuntu is ancient (v9.0). But if you bootstrap pip via

curl https://bootstrap.pypa.io/get-pip.py | python3.8 -

Then you can run the install commands, albeit without the --user part.

After that, installation proceeds without errors. Closing this issue.

EDIT: I just realized you are using Python 3.7. We don’t support that. Only Python3.8 from the December release, and Python 3.6 for November and before

So everything is actually normal. PIP complains he can’t find a candidate to install because None exists.

My apologies, I forgot to follow this up.

https://developer.download.nvidia.com/compute/redist/nvidia-tensorflow/ shows the list of WHL files.

Based on those filenames, it seems that “Only Python3.8” from an earlier reply is probably meant to be taken literally? 😃 ie, no support for 3.9 or later.

I set up a virtual environment with Python 3.8.15 and was able to install nvidia-tensorflow 1.15.5+nv22.11

I have the same issue under Ubuntu 22.04.1 LTS with Python 3.10.6

Trying:

pip install nvidia-pyindex pip install nvidia-tensorflow[horovod]

or

pip install --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com nvidia-tensorflow

Both return the error previously shown which advises the package is a pypi.org placeholder and to see the install instructions.

EDIT: I notice that https://pypi.org/simple returns HTML that appears to be a list of packages, whereas https://pypi.ngc.nvidia.com redirects to https://developer.download.nvidia.com/compute/redist/ (which is a blank page)

I’m unsure whether the pypi.org HTML is there simply for the benefit of humans, or that’s the actual index data that pip uses. If it’s the latter, that may explain why pip cannot find nvidia-tensorflow on pypi.ngc.nvidia.com.