Problem installing pycuda with AGX Orin

Hello,

i have a problem when i try to install pycuda on my AGX Orin.

Here is the end of the error message :

  aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/tmp/pip-build-env-i1k5nd10/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -c bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.cpp -o build/temp.linux-aarch64-cpython-38/bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.o
  In file included from bpl-subset/bpl_subset/boost/python/detail/prefix.hpp:13,
                   from bpl-subset/bpl_subset/boost/python/handle.hpp:8,
                   from bpl-subset/bpl_subset/boost/python/converter/arg_to_python_base.hpp:7,
                   from bpl-subset/bpl_subset/libs/python/src/converter/arg_to_python_base.cpp:6:
  bpl-subset/bpl_subset/boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
     50 | # include <pyconfig.h>
        |           ^~~~~~~~~~~~
  compilation terminated.
  /usr/local/lib/python3.8/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'pycuda.cuda' as data is deprecated, please list it in `packages`.
      !!
  
  
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'pycuda.cuda' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
  
      'pycuda.cuda' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
  
      Please make sure that 'pycuda.cuda' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
  
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  
  
  !!
  
    check.warn(importable)
  error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycuda
Failed to build pycuda
ERROR: Could not build wheels for pycuda, which is required to install pyproject.toml-based projects

If someone can help me, it would be cool.

Alain

Hi Alain, did you run sudo apt-get install python3-dev beforehand?

Hello Dusty,

yes, i ran sudo apt-get install python3-dev before.

I will check boost Python to see if everything is ok. Maybe i was too fast with software installation.

Alain

Hello,

i had finally several issues.

What was missing :

sudo apt install libboost-all-dev

export CPATH=$CPATH:/usr/local/cuda-11.4/targets/aarch64-linux/include

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-11.4/targets/aarch64-linux/lib

Then :

pip3 install pycuda --user

And finally, pycuda is installed.

Alain

6 Likes

Also have to add this in .bashrc :

export PATH=$PATH:/usr/local/cuda-11.4/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.4/lib64

And now, Jetsonsky works !

Alain

2 Likes

OK great, that’s great to hear Alain! Glad that you were able to figure it out. Thanks for letting us know.

Hello Dusty,

yes, it’s great everything works really fine.

I have modified /etc/environnement to add the 2 path (bin and lib64) to be able to run JetsonSky with IDLE. It’s ok.

I have tested my software with my cameras. Everything work since 10mn so i don’t have a huge feedback BUT from what i see, the AGX Orin is much faster than my laptop (i7-8750H and GTX1060). This is really amazing.

I will verify everything and when all will be ok (it seems it is the case), i will try to use VPI with my software.

Alain

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.