Unable to install pyindex

Hey there,

I am trying to install nvidia-pyindex with pip. However, it always throws the same error. All responses in other forum discussions don’t work for me.
OS: Windows 10
py version: 3.10.4
pip version: 22.1.1

I have completed every previous step for CUDA installation for Windows stated in CUDA Installation

However, the following error occurs:

py -m pip install nvidia-pyindex
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-pyindex
  Downloading nvidia-pyindex-1.0.9.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: nvidia-pyindex
  Building wheel for nvidia-pyindex (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [72 lines of output]
      C:\Program Files\Python310\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib
      creating build\lib\nvidia_pyindex
      copying nvidia_pyindex\cmdline.py -> build\lib\nvidia_pyindex
      copying nvidia_pyindex\utils.py -> build\lib\nvidia_pyindex
      copying nvidia_pyindex\__init__.py -> build\lib\nvidia_pyindex
      running egg_info
      writing nvidia_pyindex.egg-info\PKG-INFO
      writing dependency_links to nvidia_pyindex.egg-info\dependency_links.txt
      writing entry points to nvidia_pyindex.egg-info\entry_points.txt
      writing top-level names to nvidia_pyindex.egg-info\top_level.txt
      reading manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.md'
      writing manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
      C:\Program Files\Python310\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(
      installing to build\bdist.win-amd64\wheel
      running install
      Traceback (most recent call last):
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\nvidia_pyindex\utils.py", line 20, in get_configuration_files
          output = subprocess.check_output(command, stderr=subprocess.STDOUT)
        File "C:\Program Files\Python310\lib\subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Program Files\Python310\lib\subprocess.py", line 524, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['C:\\Program Files\\Python310\\python.exe', 'FilesPython310python.exe', '-c', 'from pip._internal.configuration import get_configuration_files; print(get_configuration_files())']' returned non-zero exit status 2.

      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 "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 238, in <module>
          setup(
        File "C:\Program Files\Python310\lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
          return run_commands(dist)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
          dist.run_commands()
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
          cmd_obj.run()
        File "C:\Program Files\Python310\lib\site-packages\wheel\bdist_wheel.py", line 335, in run
          self.run_command('install')
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
          cmd_obj.run()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 172, in run
          _install_nvidia_pypi_index()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 71, in _install_nvidia_pypi_index
          config_filedict = get_configuration_files()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\nvidia_pyindex\utils.py", line 24, in get_configuration_files
          raise RuntimeError(output) from e
      RuntimeError: C:\Program Files\Python310\python.exe: can't open file 'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-e_ykk4rm\\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\\FilesPython310python.exe': [Errno 2] No such file or directory


      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      COMMAND: InstallCommand
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for nvidia-pyindex
  Running setup.py clean for nvidia-pyindex
Failed to build nvidia-pyindex
Installing collected packages: nvidia-pyindex
  Running setup.py install for nvidia-pyindex ... error
  error: subprocess-exited-with-error

  × Running setup.py install for nvidia-pyindex did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      C:\Program Files\Python310\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      C:\Program Files\Python310\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(
      Traceback (most recent call last):
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\nvidia_pyindex\utils.py", line 20, in get_configuration_files
          output = subprocess.check_output(command, stderr=subprocess.STDOUT)
        File "C:\Program Files\Python310\lib\subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Program Files\Python310\lib\subprocess.py", line 524, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['C:\\Program Files\\Python310\\python.exe', 'FilesPython310python.exe', '-c', 'from pip._internal.configuration import get_configuration_files; print(get_configuration_files())']' returned non-zero exit status 2.

      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 "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 238, in <module>
          setup(
        File "C:\Program Files\Python310\lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
          return run_commands(dist)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
          dist.run_commands()
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "C:\Program Files\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
          cmd_obj.run()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 172, in run
          _install_nvidia_pypi_index()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\setup.py", line 71, in _install_nvidia_pypi_index
          config_filedict = get_configuration_files()
        File "C:\Users\PC\AppData\Local\Temp\pip-install-e_ykk4rm\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\nvidia_pyindex\utils.py", line 24, in get_configuration_files
          raise RuntimeError(output) from e
      RuntimeError: C:\Program Files\Python310\python.exe: can't open file 'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-e_ykk4rm\\nvidia-pyindex_4e4d54a82f4b4546b3d87b32642412a0\\FilesPython310python.exe': [Errno 2] No such file or directory


      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      COMMAND: InstallCommand
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> nvidia-pyindex

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

Can somebody help me out?

1 Like