Install Pytorch on Jetson nano

i was installing Pytorch on Jetson nano, but the error appeared in the terminal.

Failed building wheel for numpy

Running clean for numpy

Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-3ywdd1ol/numpy/’;f=getattr(tokenize, ‘open’, open)(file);’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” clean --all:

Running from numpy source directory. clean is not supported, use one of the following instead:

- `git clean -xdf` (cleans all files)

- `git clean -Xdf` (cleans all versioned files, doesn't touch

                    files that aren't checked into the git repo)

Add --force to your command to use it anyway if you must (unsupported).

Failed cleaning build dir for numpy

Failed to build numpy

Installing collected packages: numpy

Running install for numpy … error

Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3ywdd1ol/numpy/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-c7wxxgs0-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:

Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install

with pip instead of using ` install`:

  - `pip install .`       (from a git repo or downloaded source


  - `pip install numpy`   (last NumPy release on PyPi)

Cythonizing sources

numpy/random/ has not changed

Processing numpy/random/

Traceback (most recent call last):

  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 59, in process_pyx

    from Cython.Compiler.Version import version as cython_version

ModuleNotFoundError: No module named 'Cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 235, in <module>


  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 231, in main


  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 222, in find_process_files

    process(root_dir, fromfile, tofile, function, hash_db)

  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 188, in process

    processor_function(fromfile, tofile)

  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 91, in process_tempita_pyx

    process_pyx(pyxfile, tofile)

  File "/tmp/pip-build-3ywdd1ol/numpy/tools/", line 64, in process_pyx

    raise OSError('Cython needs to be installed in Python as a module')

OSError: Cython needs to be installed in Python as a module

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/tmp/pip-build-3ywdd1ol/numpy/", line 508, in <module>


  File "/tmp/pip-build-3ywdd1ol/numpy/", line 488, in setup_package


  File "/tmp/pip-build-3ywdd1ol/numpy/", line 285, in generate_cython

    raise RuntimeError("Running cythonize failed!")

RuntimeError: Running cythonize failed!


Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-3ywdd1ol/numpy/’;f=getattr(tokenize, ‘open’, open)(file);’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-c7wxxgs0-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-3ywdd1ol/numpy/

What is to be done about this problem?


The error indicates a missing library.
Please install it first and try again.

$ sudo apt-get install python3-pip
$ pip3 install cython


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