Cannot install tf-nightly-gpu on ubuntu with Python 3.9.16 or 3.10
Hi @boxabirds ,

Please use `pip install tf-nightly` and it will take care of GPU package also. Starting from TF2.12 GPU package made redundant and both `tensorflow-gpu` and `tf-nightly-gpu` were removed and replaced with packages that direct users to switch to `tensorflow` or `tf-nightly` respectively. Please refer to release notes [here](https://github.com/tensorflow/tensorflow/releases/tag/v2.12.0). Thanks. YesI just noticed that in the tf-nightly-gpu package README. I
tried tg-nightly and it said it didn’t detect my GPU. I have CUDA 12.1 on
my RTX 4090.

On Mon, 15 May 2023 at 05:04, SuryanarayanaY ***@***.***>
wrote:

> Hi @boxabirds <https://github.com/boxabirds> ,
>
> Please use pip install tf-nightly and it will take care of GPU package
> also. Starting from TF2.12 GPU package made redundant and both
> tensorflow-gpu and tf-nightly-gpu were removed and replaced with packages
> that direct users to switch to tensorflow or tf-nightly respectively.
> Please refer to release notes here
> <https://github.com/tensorflow/tensorflow/releases/tag/v2.12.0>.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/tensorflow/tensorflow/issues/60594#issuecomment-1547160580>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AABD62P2CB5BWHLERYC46F3XGGTMRANCNFSM6AAAAAAYBBQA3M>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
 Hi @boxabirds ,

For GPU support please follow the official instructions mentioned [here](https://www.tensorflow.org/install/pip#step-by-step_instructions). Please go through the instructions and let us know if it helps and if not please let us know the commands you have used.

Please ensure GPU driver has been installed and running. It can be confirmed with `nvidia-smi` command. Please verify this first and if this command displays info about CUDA driver then we need to go for CUDA toolkit and cuDNN installations and path settings as instructed in attached documentation resource.

Thanks! Thanks so much — apologies for being thick on this: the release notes I
couldn’t find any instructions for installation, only build. I really want
to avoid building TF myself. Are you saying I need to build TF to work with
CUDA 12 and support the RTX 4090? Or was there another link?

Apologies again and thanks very much in advance— I’m asking for specifics
on this because I’ve spent over a day trying to get this going and my
contingency of using a docker container with older TF versions and CUDA 11 seems to
come with very significant performance impacts.

On Mon, 15 May 2023 at 08:07, SuryanarayanaY ***@***.***>
wrote:

> Hi @boxabirds <https://github.com/boxabirds> ,
>
> For GPU support please follow the official instructions mentioned here.
> Please go through the instructions and let us know if it helps and if not
> please let us know the commands you have used.
>
> Please ensure GPU driver has been installed and running. It can be
> confirmed with nvidia-smi command. Please verify this first and if this
> command displays info about CUDA driver then we need to go for CUDA toolkit
> and cuDNN installations and path settings as instructed in attached
> documentation resource.
>
> Thanks!
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/tensorflow/tensorflow/issues/60594#issuecomment-1547302149>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AABD62NNEZBOVUKQXC7M6ULXGHI2PANCNFSM6AAAAAAYBBQA3M>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
 @boxabirds ,

> Thanks so much — apologies for being thick on this: the release notes I couldn’t find any instructions for installation, only build. I really want to avoid building TF myself. Are you saying I need to build TF to work with CUDA 12 and support the RTX 4090? Or was there another link?

You need to setup GPU manually by following the instructions mentioned in documentation. It's not for Building Tensorflow itself. Even with Pip wheel of Tensorflow to enable GPU support you have to do some manual setups. The same mentioned [here](https://www.tensorflow.org/install/pip#step-by-step_instructions).

However if you are using Docker container then you need to install and run nvidia-docker image first followed by tensorflow-image. The instructions are mentioned [here](https://www.tensorflow.org/install/docker#gpu_support).

Please check and come back if still having queries. Thanks!

 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60594">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60594">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

binary

### Tensorflow Version

tf-nightly-gpu

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.9.16 and 3.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

I'm trying to run
`pip install tf-nightly-gpu`

with Ubuntu 22.04, CUDA 12.1 on an RTX 4090 GPU with 24GB RAM and both Python 3.9.16 and Python 3.10. Installing just `tf-nightly` installs ok but prevents my setup from using my GPU at all which is… not ideal :)

My script also uses pytorch those bits are running fine so I don't think it's an issue with the CUDA setup itself.


### Standalone code to reproduce the issue

```shell
pip install tf-nightly-gpu
```


### Relevant log output

**Note while the logs below show python 3.10 I have the same errors against Python 3.9.16**

```shell
Collecting tf-nightly-gpu
  Downloading tf-nightly-gpu-2.12.0.tar.gz (2.6 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Traceback (most recent call last):
        File "/home/…/python3.10/site-packages/setuptools/_vendor/packaging/requirements.py", line 35, in __init__
          parsed = parse_requirement(requirement_string)
        File "/home/…/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 64, in parse_requirement
          return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
        File "/home/…/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 82, in _parse_requirement
          url, specifier, marker = _parse_requirement_details(tokenizer)
        File "/home/…/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 126, in _parse_requirement_details
          marker = _parse_requirement_marker(
        File "/home/…python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 147, in _parse_requirement_marker
          tokenizer.raise_syntax_error(
        File "/home/…python3.10/site-packages/setuptools/_vendor/packaging/_tokenizer.py", line 163, in raise_syntax_error
          raise ParserSyntaxError(
      setuptools.extern.packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier)
          python_version>"3.7"
                        ^

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-rweboy03/tf-nightly-gpu_e9119949fe52419d9624f697273ca4ab/setup.py", line 40, in <module>
          setuptools.setup()
        File "/home/…/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
          _install_setup_requires(attrs)
        File "/home/…/python3.10/site-packages/setuptools/__init__.py", line 77, in _install_setup_requires
          dist.parse_config_files(ignore_option_errors=True)
        File "/home/…python3.10/site-packages/_virtualenv.py", line 22, in parse_config_files
          result = old_parse_config_files(self, *args, **kwargs)
        File "/home/…python3.10/site-packages/setuptools/dist.py", line 910, in parse_config_files
          self._finalize_requires()
        File "/home/…/python3.10/site-packages/setuptools/dist.py", line 607, in _finalize_requires
          self._move_install_requirements_markers()
        File "/home/…/python3.10/site-packages/setuptools/dist.py", line 647, in _move_install_requirements_markers
          inst_reqs = list(_reqs.parse(spec_inst_reqs))
        File "/home/…/python3.10/site-packages/setuptools/_vendor/packaging/requirements.py", line 37, in __init__
          raise InvalidRequirement(str(e)) from e
      setuptools.extern.packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
          python_version>"3.7"
                        ^
      [end of output]

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