TensorRT
TensorRT copied to clipboard
pip install fail for python >3.12
Description
TensorRT pip installation fails for Python > 3.12. Discovered while testing another library for compatibility with python 3.12 ultralytics/ultralytics/issues/6800 and did not find any related open/closed issues in the repo. Using the same machine but different venv under python 3.10 and 3.11, no issues with installation of tensorrt using the same methods attempted for python >3.12
Environment
TensorRT Version:
- N/A
NVIDIA GPU:
- NVIDIA GeForce RTX 2060
NVIDIA Driver Version:
- 545.29.02
CUDA Version:
- 12.3
CUDNN Version:
- N/A
Operating System:
- Pop!_OS 22.04 LTS
Python Version (if applicable):
- 3.12.0
- 3.12.1
Tensorflow Version (if applicable):
- N/A
PyTorch Version (if applicable):
- N/A
Baremetal or Container (if so, version):
- Baremetal
Relevant Files
Model link:
- N/A
Steps To Reproduce
Commands or scripts:
pip install tensorrt
OR
-
pip install tensorrt --extra-index-url https://pypi.nvidia.com -
tested both using python 3.12.0 and 3.12.1
Stack trace from python 3.12.0 attempt
pip install tensorrt --extra-index-url https://pypi.nvidia.com
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting tensorrt
Using cached https://pypi.nvidia.com/tensorrt/tensorrt-8.6.1.post1.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tensorrt-libs==8.6.1 (from tensorrt)
Using cached https://pypi.nvidia.com/tensorrt-libs/tensorrt_libs-8.6.1-py2.py3-none-manylinux_2_17_x86_64.whl (824.8 MB)
INFO: pip is looking at multiple versions of tensorrt to determine which version is compatible with other requirements. This could take a while.
Collecting tensorrt
Using cached https://pypi.nvidia.com/tensorrt/tensorrt-8.6.1.tar.gz (16 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt
Building wheel for tensorrt (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for tensorrt (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [64 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/tensorrt
copying tensorrt/__init__.py -> build/lib/tensorrt
running egg_info
writing tensorrt.egg-info/PKG-INFO
writing dependency_links to tensorrt.egg-info/dependency_links.txt
writing requirements to tensorrt.egg-info/requires.txt
writing top-level names to tensorrt.egg-info/top_level.txt
reading manifest file 'tensorrt.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'tensorrt.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
/home/burhan/Documents/_code/cleanpy312/.py312/bin/python: No module named pip
Traceback (most recent call last):
File "/home/burhan/Documents/_code/cleanpy312/.py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/burhan/Documents/_code/cleanpy312/.py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/burhan/Documents/_code/cleanpy312/.py312/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 404, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 49, in <module>
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 403, in run
self.run_command("install")
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/tmp/pip-build-env-9fu336js/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 43, in run
File "<string>", line 41, in install_dep
File "/home/burhan/.pyenv/versions/3.12.0/lib/python3.12/subprocess.py", line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/home/burhan/Documents/_code/cleanpy312/.py312/bin/python', '-m', 'pip', 'install', 'tensorrt_libs==8.6.1', '--index-url', 'https://pypi.nvidia.com']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tensorrt
Failed to build tensorrt
ERROR: Could not build wheels for tensorrt, which is required to install pyproject.toml-based projects
Have you tried the latest release?:
- Not the the
.debbut attempted to install the most recent PyPi published package
Can this model run on other frameworks? For example run ONNX model with ONNXRuntime (polygraphy run <model.onnx> --onnxrt):
- N/A
I believe our pre-built package only support up to python 3.11. @pranavm-nvidia @ttyio do we have plan to support python 3.12?
We do plan to support it in the next release.
@zerollzeng and @pranavm-nvidia thank you both! I opened the issue since I didn't find any existing and to use as reference while tracking external package readiness for python 3.12.
TensorRT Python Bindings install fail. TENSORRT_MODULE=tensorrt PYTHON_MAJOR_VERSION=3 PYTHON_MINOR_VERSION=12 TARGET_ARCHITECTURE=x86_64 ./build.sh
./build.sh: line 16: $'\r': command not found : invalid option 17: set: - set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] ./build.sh: line 18: $'\r': command not found ./build.sh: line 26: $'\r': command not found ~/Qwen-7B-Chat-TensorRT-LLM/qwen/TensorRT/python ./build.sh: line 29: $'\r': command not found CMake Warning: Ignoring extra path from command line:
" "
/python" does not appear to contain CMakeLists.txt.at-TensorRT-LLM/qwen/TensorRT Specify --help for usage, or press the help button on the CMake GUI. ./build.sh: line 32: $'-DTARGET=x86_64\r': command not found ./build.sh: line 33: $'-DPYTHON_MAJOR_VERSION=3\r': command not found ./build.sh: line 34: $'-DPYTHON_MINOR_VERSION=12\r': command not found : No such file or directoryPATH=/tmp/external /include: No such file or directory_DIRS=/usr/local/cuda : No such file or directoryORRT_ROOT=/root/Qwen-7B-Chat-TensorRT-LLM/qwen/TensorRT ./build.sh: line 38: -DTENSORRT_MODULE=tensorrt: command not found : No such file or directoryORRT_LIBPATH=/usr/local/tensorrt/lib make: the '-j' option requires a positive integer argument Usage: make [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. -E STRING, --eval=STRING Evaluate STRING as a makefile statement. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from recipes. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any recipe; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -O[TYPE], --output-sync[=TYPE] Synchronize output of parallel jobs by TYPE. -p, --print-data-base Print make's internal database. -q, --question Run no recipe; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo recipes. --no-silent Echo recipes (disable --silent mode). -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. --trace Print tracing information. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced.
This program built for x86_64-pc-linux-gnu
Report bugs to [email protected]
./build.sh: line 41: $'\r': command not found
awk: cmd. line:1: warning: regexp escape sequence \#' is not a known regexp operator /include/NvInferVersion.h' for reading: No such file or directoryn/TensorRT awk: cmd. line:1: warning: regexp escape sequence #' is not a known regexp operator
/include/NvInferVersion.h' for reading: No such file or directoryn/TensorRT
awk: cmd. line:1: warning: regexp escape sequence \#' is not a known regexp operator /include/NvInferVersion.h' for reading: No such file or directoryn/TensorRT awk: cmd. line:1: warning: regexp escape sequence #' is not a known regexp operator
/include/NvInferVersion.h' for reading: No such file or directoryn/TensorRT
./build.sh: line 49: $'\r': command not found
.bindings for TensorRT
./build.sh: line 51: $'\r': command not found
./build.sh: line 52: syntax error near unexpected token $'{\r'' '/build.sh: line 52: expand_vars_cp () {
Hi,
Any updates on this issue*
Trying to pip install --pre tensorrt in order to get the 9.3 version I get this error.
Using cached tensorrt-9.3.0.post12.dev1.tar.gz (6.9 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-hbq2rvhy\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-hbq2rvhy\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-hbq2rvhy\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-hbq2rvhy\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 90, in <module>
RuntimeError: Bad params
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I've tried simply pip install tensorrt but that defaults to the older 8.6 release which I assume is now basically irrelevant.
So I tested this on Windows 10 where I don't have CUDA Toolkit or cuDNN installed and wrote a little tutorial for the Ultralytics community Discord as a work around. It's a pre-release, so not guaranteed to work or be stable, but I did a quick export and inference test with Ultralytics YOLO and it didn't throw any errors. Your mileage may vary.
-
Make sure you have latest Nvidia drivers installed
-
Download 7zip or anything that will handle
.tar.gzfiles and then in your project directory, installtorchandtorchvisionwith CUDA (any recent version) if not already installed for your project. -
Go to https://pypi.nvidia.com/tensorrt/ and download latest tensorrt-9.x.x.postx.tar.gz (for me it was tensorrt-9.2.0.post12.dev5.tar.gz) to any directory; Downloads is okay.
-
Go to directory where you downloaded .tar.gz open with 7zip and extract the tensorrt-9.X.X.postYdevZ folder (use the same directory where .tar.gz file is saved.
-
After extracted, hold SHIFT and press the right-mouse-button (RMB) on the tensorrt-9.X.X.postYdevZ directory you just extracted and choose "Copy as path" from the menu (copies full path location to clipboard)
-
Activate your project
venv, then type pip install and then paste (RMB) the full path.Example:
pip install "C:/User/Name/Downloads/tensorrt-9.2.0.post12.dev5
Hi, I will test it in the following hours and come back to this. Thank you!
Ok,
I have installed the latest pytorch versions with pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 ( tried both in regular system level python and venv btw )
I have made sure I have the latest available drivers, for w/e it's worth I am using a 3090.
I have download the latest release I could find on https://pypi.nvidia.com/tensorrt/, which seemed to be 9.3.0.post12.dev1
Extracted and followed everything as per your guide and ran into a similar building issue with bad_params as a keyword from what I've seen after a quick glance.
(venv) PS G:\> pip install "G:\tensorrt-9.3.0.post12.dev1" --verbose
Using pip 24.0 from G:\venv\Lib\site-packages\pip (python 3.12)
Processing g:\tensorrt-9.3.0.post12.dev1
Running command pip subprocess to install build dependencies
Collecting setuptools>=40.8.0
Using cached setuptools-69.1.1-py3-none-any.whl.metadata (6.2 kB)
Using cached setuptools-69.1.1-py3-none-any.whl (819 kB)
Installing collected packages: setuptools
Successfully installed setuptools-69.1.1
Installing build dependencies ... done
Running command Getting requirements to build wheel
Getting requirements to build wheel ... done
Running command pip subprocess to install backend dependencies
Collecting wheel
Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Using cached wheel-0.42.0-py3-none-any.whl (65 kB)
Installing collected packages: wheel
Successfully installed wheel-0.42.0
Installing backend dependencies ... done
Running command Preparing metadata (pyproject.toml)
running dist_info
creating C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info
writing C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\PKG-INFO
writing dependency_links to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\dependency_links.txt
writing requirements to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\requires.txt
writing top-level names to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\top_level.txt
writing manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt.egg-info\SOURCES.txt'
creating 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-3mn4b3nw\tensorrt-9.3.0.post12.dev1.dist-info'
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt
Running command Building wheel for tensorrt (pyproject.toml)
running bdist_wheel
running build
running build_py
running egg_info
writing tensorrt.egg-info\PKG-INFO
writing dependency_links to tensorrt.egg-info\dependency_links.txt
writing requirements to tensorrt.egg-info\requires.txt
writing top-level names to tensorrt.egg-info\top_level.txt
reading manifest file 'tensorrt.egg-info\SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'tensorrt.egg-info\SOURCES.txt'
installing to build\bdist.win-amd64\wheel
running install
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting tensorrt_libs==9.3.0.post12.dev1
Using cached https://pypi.nvidia.com/tensorrt-libs/tensorrt_libs-9.3.0.post12.dev1-py2.py3-none-win_amd64.whl (1056.4 MB)
Collecting tensorrt_bindings==9.3.0.post12.dev1
Using cached tensorrt-bindings-9.3.0.post12.dev1.tar.gz (6.9 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[20 lines of output]
Traceback (most recent call last):
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-krx1z86u\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-krx1z86u\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-krx1z86u\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-krx1z86u\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 90, in <module>
RuntimeError: Bad params
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting tensorrt_libs==9.3.0.post12.dev1
Using cached https://pypi.nvidia.com/tensorrt-libs/tensorrt_libs-9.3.0.post12.dev1-py2.py3-none-win_amd64.whl (1056.4 MB)
Collecting tensorrt_bindings==9.3.0.post12.dev1
Using cached tensorrt-bindings-9.3.0.post12.dev1.tar.gz (6.9 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[20 lines of output]
Traceback (most recent call last):
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-wk4yneii\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-wk4yneii\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-wk4yneii\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-wk4yneii\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 90, in <module>
RuntimeError: Bad params
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Traceback (most recent call last):
File "<string>", line 41, in run_pip_command
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['G:\\venv\\Scripts\\python.exe', '-m', 'pip', 'install', '--extra-index-url', 'https://pypi.nvidia.com', 'tensorrt_libs==9.3.0.post12.dev1', 'tensorrt_bindings==9.3.0.post12.dev1']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 120, in <module>
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\normal\Lib\site-packages\wheel\bdist_wheel.py", line 403, in run
self.run_command("install")
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-6rjaynjv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 72, in run
File "<string>", line 57, in run_pip_command
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['G:\\venv\\Scripts\\pip.exe', 'install', '--extra-index-url', 'https://pypi.nvidia.com', 'tensorrt_libs==9.3.0.post12.dev1', 'tensorrt_bindings==9.3.0.post12.dev1']' returned non-zero exit status 1.
error: subprocess-exited-with-error
× Building wheel for tensorrt (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: 'G:\venv\Scripts\python.exe' 'G:\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\nilas\AppData\Local\Temp\tmpbfq5m4hl'
cwd: G:\tensorrt-9.3.0.post12.dev1
Building wheel for tensorrt (pyproject.toml) ... error
ERROR: Failed building wheel for tensorrt
Failed to build tensorrt
ERROR: Could not build wheels for tensorrt, which is required to install pyproject.toml-based projects
Adding to this, I will also mention I have CMake, Swig and all C++ developer tools in system PATH through Visual Studio 2022. Though I will also give it a try with the 'developer' terminal in a few minutes.
@NevermindNilas to be honest, it's been a while since I did this. I made this requirements.txt from pip freeze (you might not need everything here) so you can take a look at what I have (that's still working). The only other suggestion I can make is that maybe try using pip cache purge to clear your local package cache. Otherwise I'm not able to offer much else for help on this and expect that since it's a prelease it's going to have limited support until the stable release is made available.
@Burhan-Q No worries, I appreciate the support. I did a quick pip cache purge but with no luck. I will also try 9.2.0 and if I am successful I will come back to this issue. Thanks!
I think pytorch-quantization has the same problem. After upgrading to Ubuntu 24.04 (Python 3.12), I cannot install pytorch-quantization using pip anymore.
$ pip install --no-cache-dir --extra-index-url https://pypi.nvidia.com pytorch-quantization
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting pytorch-quantization
Downloading pytorch-quantization-2.2.1.tar.gz (6.8 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "/.../lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/.../lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-texhli5h/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-texhli5h/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-texhli5h/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-texhli5h/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 81, in <module>
RuntimeError: Bad params
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Hi @senarvi , FYI the pytorch-quantization will be deprecated in next release, we will switch to https://github.com/NVIDIA/TensorRT-Model-Optimizer
@ttyio thanks! That's good to know.