pytorch-nightly not have torch/version.py.tpl:cuda specified
Labels: oncall: binaries, module: windows, triaged

### 🐛 Describe the bug

When trying to use pytorch-nightly there is no cuda Version in version.py generated file

```
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\torch\utils\cpp_extension.py", line 382, in _check_cuda_version
      torch_cuda_version = packaging.version.parse(torch.version.cuda)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 49, in parse
      return Version(version)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__
      match = self._regex.search(version)
  TypeError: expected string or bytes-like object
  [end of output]
```

more stacktrace
```
Successfully installed accelerate-0.18.0 datasets-2.10.1 safetensors-0.3.0 transformers-4.28.0
Processing g:\git-jv\ai\oobabooga_one-click-installersk-installers\text-generation-webui\repositories\gptq-for-llama
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: quant-cuda
  Building wheel for quant-cuda (setup.py): started
  Building wheel for quant-cuda (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.
  exit code: 1

  [50 lines of output]
  No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
  running bdist_wheel
  running build
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\text-generation-webui\repositories\GPTQ-for-LLaMa\setup.py", line 4, in <module>
      setup(
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
      self.run_command(cmd_name)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
      self.build_extensions()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\torch\utils\cpp_extension.py", line 500, in build_extensions
      _check_cuda_version(compiler_name, compiler_version)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\torch\utils\cpp_extension.py", line 382, in _check_cuda_version
      torch_cuda_version = packaging.version.parse(torch.version.cuda)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 49, in parse
      return Version(version)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__
      match = self._regex.search(version)
  TypeError: expected string or bytes-like object
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for quant-cuda
  Running setup.py clean for quant-cuda
Failed to build quant-cuda
Installing collected packages: quant-cuda
  Attempting uninstall: quant-cuda
    Found existing installation: quant-cuda 0.0.0
    Uninstalling quant-cuda-0.0.0:
      Successfully uninstalled quant-cuda-0.0.0
  Running setup.py install for quant-cuda: started
  Running setup.py install for quant-cuda: finished with status 'error'
  error: subprocess-exited-with-error

  Running setup.py install for quant-cuda did not run successfully.
  exit code: 1

  [54 lines of output]
  No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
  running install
  G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
    warnings.warn(
  running build
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\text-generation-webui\repositories\GPTQ-for-LLaMa\setup.py", line 4, in <module>
      setup(
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\command\install.py", line 68, in run
      return orig.install.run(self)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
      self.run_command('build')
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
      self.run_command(cmd_name)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
      _build_ext.run(self)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
      self.build_extensions()
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\torch\utils\cpp_extension.py", line 500, in build_extensions
      _check_cuda_version(compiler_name, compiler_version)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\torch\utils\cpp_extension.py", line 382, in _check_cuda_version
      torch_cuda_version = packaging.version.parse(torch.version.cuda)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 49, in parse
      return Version(version)
    File "G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 264, in __init__
      match = self._regex.search(version)
  TypeError: expected string or bytes-like object
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Rolling back uninstall of quant-cuda
  Moving to g:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\quant_cuda-0.0.0.dist-info\
   from G:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\Lib\site-packages\~uant_cuda-0.0.0.dist-info
  Moving to g:\git-jv\ai\oobabooga_one-click-installersk-installers\installer_files\env\lib\site-packages\quant_cuda.cp310-win_amd64.pyd
   from C:\Users\b1tche5this15myusernamecensored\AppData\Local\Temp\pip-uninstall-zprl3o0n\quant_cuda.cp310-win_amd64.pyd
error: legacy-install-failure

Encountered error while trying to install package.

quant-cuda

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```

### Versions

I install pytorch like this:
`conda install -y -k pytorch torchvision torchaudio pytorch-cuda=12.1 cuda-toolkit ninja git -c pytorch-nightly -c nvidia`
outpu of collect_env.py from conda env in oobabooga/one_click_installers's created env:
```
G:\git-jv\ai\oobabooga_one-click-installersk-installers>"installer_files\conda\condabin\conda.bat" activate ".\installer_files\env" >nul && python collect_env.py
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.11 | packaged by Anaconda, Inc. | (main, Apr 20 2023, 18:56:50) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22623-SP0
Is CUDA available: N/A
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3080
Nvidia driver version: 531.79
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Architecture=9
CurrentClockSpeed=3401
DeviceID=CPU0
Family=107
L2CacheSize=8192
L2CacheSpeed=
Manufacturer=AuthenticAMD
MaxClockSpeed=3401
Name=AMD Ryzen 9 5950X 16-Core Processor
ProcessorType=3
Revision=8448

Versions of relevant libraries:
[pip3] numpy==1.24.3
[pip3] torch==2.1.0.dev20230518
[pip3] torchaudio==2.1.0.dev20230518
[pip3] torchvision==0.16.0.dev20230518
[conda] blas                      1.0                         mkl
[conda] mkl                       2023.1.0         h8bd8f75_46356
[conda] mkl-service               2.4.0           py310h2bbff1b_1
[conda] mkl_fft                   1.3.6           py310h4ed8f06_1
[conda] mkl_random                1.2.2           py310h4ed8f06_1
[conda] numpy                     1.24.3          py310h055cbcc_1
[conda] numpy-base                1.24.3          py310h65a83cf_1
[conda] pytorch                   2.1.0.dev20230518    py3.10_cpu_0    pytorch-nightly
[conda] pytorch-cuda              12.1                 hde6ce7c_5    pytorch-nightly
[conda] pytorch-mutex             1.0                         cpu    pytorch-nightly
[conda] torchaudio                2.1.0.dev20230518       py310_cpu    pytorch-nightly
[conda] torchvision               0.16.0.dev20230518       py310_cpu    pytorch-nightly
```

cc @seemethere @malfet @peterjc123 @mszhanyi @skyline75489 @nbcsm @vladimir-aubrecht