PyTorch from /jp6/cu126 on Jetson Orin Nano (JetPack 6.2.1 / CUDA 12.6) failing due to NumPy mismatch

I have downloaded and compiled OpenCV 4.11.0 with CUDA against a ‘standard’ Jetpack install which comes with numpy 1.21
Ok - so far.

Then I created a python virtual environment and linked numpy and open-cv to dist-packages set
Next step was to install Torch. I used
pip install torch torchvision --index-url https://pypi.jetson-ai-lab.io/jp6/cu126` --force-reinstall`

it crashed with
Collecting numpy
Downloading ``https://pypi.jetson-ai-lab.io/root/pypi/%2Bf/efd/28d4e9cd7d7a8/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl`` (14.3 MB)
<>
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: ‘/home/jc/M5Code/mainHost/AI_model/v-yolo/lib/python3.10/site-packages/numpy/config.py’
Check the permissions.

Yes I do not want it destroying the dist-packages versions.
It is insisting on numpy 2.2.6 and the base distribution insist on 1.21
How to resolve ?

P.S This is after spending many days, unsuccessfully, trying to do it the other way round.
ie to Get the base dist_packages either up to numpy 2 or out of the way so I could start with a numpy 2 world.

Thanks

JC

Hi,

The error indicates a permission issue.
Could you try the command with root?

Thanks.

I am sure that would work but I dont want it clobbering the dist_packages. And having a python virtual environment as root does not make any sense

Hi,

Or could you check why you don’t have the permission for the file below:

‘/home/jc/M5Code/mainHost/AI_model/v-yolo/lib/python3.10/site-packages/numpy/` **`config`** `.py’

Ideally, you should not need the root permission for the location under ${HOME}.
Thanks.