Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install TensorRT-LLM #2597

Open
gowthamtupili opened this issue Dec 20, 2024 · 3 comments
Open

Unable to install TensorRT-LLM #2597

gowthamtupili opened this issue Dec 20, 2024 · 3 comments

Comments

@gowthamtupili
Copy link

Device Details:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

I am trying to build tensorRT-LLM for whisper, and I have followed the steps as mentioned in https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/whisper#readme, but I am getting the following errors,
When I am using python version 3.8 and pip install -r requirements.txt command, it is giving me the following error
Collecting tensorrt_llm==0.17.0.dev2024121700 (from -r requirements.txt (line 1))
Using cached tensorrt_llm-0.17.0.dev2024121700.tar.gz (1.4 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [54 lines of output]
INFO:wheel-stub:Testing wheel tensorrt_llm-0.17.0.dev2024121700-cp310-cp310-linux_x86_64.whl against tag cp310-cp310-linux_x86_64
INFO:wheel-stub:Testing wheel tensorrt_llm-0.17.0.dev2024121700-cp312-cp312-linux_aarch64.whl against tag cp312-cp312-linux_aarch64
INFO:wheel-stub:Testing wheel tensorrt_llm-0.17.0.dev2024121700-cp312-cp312-linux_x86_64.whl against tag cp312-cp312-linux_x86_64
File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/wheel.py", line 235, in download_wheel
return download_manual(wheel_directory, distribution, version, config)
File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/wheel.py", line 173, in download_manual
raise RuntimeError(f"Didn't find wheel for {distribution} {version}")
Traceback (most recent call last):
File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/wheel.py", line 235, in download_wheel
return download_manual(wheel_directory, distribution, version, config)
File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/wheel.py", line 173, in download_manual
raise RuntimeError(f"Didn't find wheel for {distribution} {version}")
RuntimeError: Didn't find wheel for tensorrt-llm 0.17.0.dev2024121700

  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/mcw/anaconda3/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/mcw/anaconda3/lib/python3.8/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/mcw/anaconda3/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
    File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/buildapi.py", line 29, in build_wheel
      return download_wheel(pathlib.Path(wheel_directory), config_settings)
    File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/wheel.py", line 237, in download_wheel
      report_install_failure(distribution, version, config, exception_context)
    File "/mnt/mydisk/tmptiny/pip-build-env-q9acj0ez/overlay/lib/python3.8/site-packages/wheel_stub/error.py", line 67, in report_install_failure
      raise InstallFailedError(
  wheel_stub.error.InstallFailedError:
  *******************************************************************************
  
  The installation of tensorrt-llm for version 0.17.0.dev2024121700 failed.
  
  This is a special placeholder package which downloads a real wheel package
  from https://pypi.nvidia.com/. If https://pypi.nvidia.com/ is not reachable, we
  cannot download the real wheel file to install.
  
  You might try installing this package via
  ```
  $ pip install --extra-index-url https://pypi.nvidia.com/ tensorrt-llm
  ```
  
  Here is some debug information about your platform to include in any bug
  report:
  
  Python Version: CPython 3.8.3
  Operating System: Linux 5.15.0-125-generic
  CPU Architecture: x86_64
  Driver Version: 560.28
  CUDA Version: 12.6
  
  *******************************************************************************
  
  [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.

However, when I change the python version from 3.8 to 3.10, and run the same command

/home/mcw/anaconda3/envs/py310/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_list_t_class'
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
error: Cannot link MPI programs. Check your configuration!!!

ERROR: Failed building wheel for mpi4py

My understanding is that
Problem:
mpi4py only works with python version 3.8 or else it will get error
tensorrt-llm only works with python version 3.10

@zhangts20
Copy link

You can try adding the directory containing libopen-rte.so.40 to the LD_LIBRARY_PATH.

@gowthamtupili
Copy link
Author

Hi @zhangts20 , it is not working
this are the logs for python version 3.10
mcw@mcw:/mnt/mydisk/TensorRT-LLM/examples/whisper$ pip install mpi4py
Defaulting to user installation because normal site-packages is not writeable
Collecting mpi4py
Using cached mpi4py-4.0.1.tar.gz (466 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Building wheels for collected packages: mpi4py
Building wheel for mpi4py (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /home/mcw/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /mnt/mydisk/tmptiny/tmpiy38n8yy
cwd: /mnt/mydisk/tmptiny/pip-install-7_ppcqty/mpi4py
Complete output (126 lines):
running bdist_wheel
running build
running build_src
using Cython 3.0.11
cythonizing 'src/mpi4py/MPI.pyx' -> 'src/mpi4py/MPI.c'
running build_py
creating build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/init.py -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/main.py -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/run.py -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/typing.py -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/bench.py -> build/lib.linux-x86_64-cpython-310/mpi4py
creating build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/pool.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/init.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/server.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/main.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/aplus.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/_base.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/util.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/_core.py -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
creating build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/pool.py -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/init.py -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/pkl5.py -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/dtlib.py -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/sync.py -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/typing.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/MPI.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/init.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/main.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/bench.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/run.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/py.typed -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/libmpi.pxd -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/MPI.pxd -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/init.pxd -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/MPI_api.h -> build/lib.linux-x86_64-cpython-310/mpi4py
copying src/mpi4py/MPI.h -> build/lib.linux-x86_64-cpython-310/mpi4py
creating build/lib.linux-x86_64-cpython-310/mpi4py/include/mpi4py
copying src/mpi4py/include/mpi4py/pycapi.h -> build/lib.linux-x86_64-cpython-310/mpi4py/include/mpi4py
copying src/mpi4py/include/mpi4py/mpi4py.h -> build/lib.linux-x86_64-cpython-310/mpi4py/include/mpi4py
copying src/mpi4py/include/mpi4py/mpi4py.i -> build/lib.linux-x86_64-cpython-310/mpi4py/include/mpi4py
copying src/mpi4py/include/mpi4py/mpi.pxi -> build/lib.linux-x86_64-cpython-310/mpi4py/include/mpi4py
copying src/mpi4py/util/pool.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/sync.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/init.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/pkl5.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/util/dtlib.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/util
copying src/mpi4py/futures/pool.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/_base.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/init.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/aplus.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/main.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/server.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/_core.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
copying src/mpi4py/futures/util.pyi -> build/lib.linux-x86_64-cpython-310/mpi4py/futures
running build_ext
MPI configuration: [mpi] from 'mpi.cfg'
MPI C compiler: /usr/bin/mpicc
MPI C++ compiler: /usr/bin/mpicxx
checking for MPI compile and link ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for MPI ABI support ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
failure.
removing: _configtest.c _configtest.o
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
checking for missing MPI functions/symbols ...
checking for function 'MPI_Type_create_f90_integer' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for function 'MPI_Type_create_f90_real' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for function 'MPI_Type_create_f90_complex' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for function 'MPI_Status_c2f' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for function 'MPI_Status_f2c' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for dlopen() availability ...
checking for header 'dlfcn.h' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
success!
checking for library 'dl' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -ldl -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
checking for function 'dlopen' ...
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread _configtest.o -L/usr/lib/x86_64-linux-gnu -ldl -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building 'mpi4py.MPI' extension
creating build/temp.linux-x86_64-cpython-310/src/mpi4py
/usr/bin/mpicc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DHAVE_DLFCN_H=1 -DHAVE_DLOPEN=1 -Isrc -I/usr/include/python3.10 -c src/mpi4py/MPI.c -o build/temp.linux-x86_64-cpython-310/src/mpi4py/MPI.o
src/mpi4py/MPI.c:16:10: fatal error: Python.h: No such file or directory
16 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/mpicc' failed with exit code 1
ERROR: Failed building wheel for mpi4py
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py which use PEP 517 and cannot be installed directly
mcw@mcw:/mnt/mydisk/TensorRT-LLM/examples/whisper$ python --version
Python 3.10.16

@zhangts20
Copy link

The error message shows your Python installation might be error, you can try using conda or reinstall your Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants