Search code examples
pipcondapython-wheelnvidia-jetson

Cannot install python wheel file in conda without sudo


I'm trying to build PyTorch from a .whl file on a jetson nano.

I am able to build and install the file but only while using sudo, attempting to pip install the file without sudo results in this error:

ERROR: torch-1.10.0a0+git36449ea-cp36-cp36m-linux_aarch64.whl is not a supported wheel on this platform.

This is strange as with admin I have no issues installing this file, but I can then only use the library by using the sudo command before going into or running with the python command.

I should note that this is in a conda environment, but even in the base conda environment this issue still occurs.

It seems like I can also install the package by using conda deactivate to deactivate conda.

I am using Python 3.7 in the conda environment and Python 3.6 outside.


Solution

  • I am using Python 3.7 in the conda environment and Python 3.6 outside.

    This is the issue. You have a cp36 whl file, so python 3.6. I am suspecting that when you run sudo pip, your systems pip is invoked, whereas when you run pip, then pip from your conda env is used, and cannot install a python 3.6 whl to a python 3.7 env.

    Either you need to get the cp37 whl or create a conda env that has python 3.6 installed