NVIDIA / tensorflow

An Open Source Machine Learning Framework for Everyone
https://developer.nvidia.com/deep-learning-frameworks
Apache License 2.0
996 stars 155 forks source link

Pip Install Error on Python 3.8.7, Suggested Install Instructions Do Not Work #58

Open 19kmunz opened 2 years ago

19kmunz commented 2 years ago

System information

Describe the problem I am trying to use tensorflow to run an old project on a 3090. I got everything set up before realizing that normal tensorflow / tensorflow-gpu does not work with the 30 series. I am trying to switch to using nvidia-tensorflow, but pip refuses to download it, outputting this message:

C:\Users\kingz\Documents\Wave-U-Net>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.dev5.tar.gz (7.9 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\kingz\AppData\Local\Temp\pip-install-7do6gsb8\nvidia-tensorflow_664175a071704da6a12449fc1db8e9b9\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.
  ###########################################################################################

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.



I have previously installed nvidia-pyindex successfully. This is very similar to [a previous issue](https://github.com/NVIDIA/tensorflow/issues/15). This was fixed by switching from python 3.7 to 3.8. I am having the same issue with version 3.8. Why isn't pip detecting the correct nvidia-tensorflow version? 
I did not go through the docker setup suggested by [the user guide](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html) due to my lack of docker experience. Should I sink my time into learning? or will fixing the pip install suffice?

**Provide the exact sequence of commands / steps that you executed before running into the problem**
I ran `pip install --user nvidia-tensorflow[horovod]` after installing CUDA 11.6, python 3.8.6, and ffmpeg.

**Any other info / logs**
I currently dont know how to access by python/pip logs, but I would be happy to provide with pointers!
nluehr commented 2 years ago

Hi @19kmunz, Unfortunately, we are not able to support TensorFlow on Windows at this time. In principle you can install the NVIDIA TensorFlow wheel on Ubuntu running under WSL2. If you want to give that a try, let us know how it goes, but I'm afraid we won't be able to help much with debugging on the Windows side. (Note you will need the second generation, WSL2, for GPU support within the Ubuntu environment).

forrestbao commented 2 years ago

This might be an issue on non-Windows platform as well. I am trying to do the same on Ubuntu Linux 22.04 and run into the same error. Maybe the pip host has some issues.

FireWolves commented 2 years ago

I've solved this by using python 3.8.0

Recontaminated commented 2 years ago

I've solved this by using python 3.8.0

@FireWolves

Were you running windows? I tried with python 3.8.0 and got the same error as 19kmunz.

iiiyx commented 2 years ago

Got it installed using python 3.8

conda create --name tf python=3.8

Rymoon commented 1 year ago

Python3.8+Ubuntu20.04 just works.

Python3.7+Ubuntu20.04 failed.

nluehr commented 1 year ago

The nvidia-tensorflow wheel is only built for Python 3.8 (see the software requirements here).

For python 3.7 you would need to rebuild from source. (instructions here, but you'll need to tweak things to build with python3.7).