Home > OS >  Jetson AGX Xavier python3 matplotlib 3.3.4 installation error
Jetson AGX Xavier python3 matplotlib 3.3.4 installation error

Time:02-11

I want to use yolov5 at my Jetson AGX Xavier developer kit and I have to upgrade matplotlib to version 3.3.4 highest version that python3.6 support. I'm using python version 3.6.9(default of Jetson AGX Xavier) and python3.6 support matplotlib version 3.3.4. But I CANNOT upgrade that over 2.1.1(and this version is default also).

I've upgrade setuptools and I tried all command I can.

$ sudo apt-get install python3-matplotlib
$ python3 -m pip install --upgrade matplotlib
$ python3 -m pip install matplotlib==3.3.4

How can I solve this problem?

Error code and image is here.

Defaulting to user installation because normal site-packages is not writeable
Collecting matplotlib==3.3.4
  Using cached matplotlib-3.3.4.tar.gz (37.9 MB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status -4:
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tk3o5hkn/matplotlib_53b7f655efb14a6a9d86b117497e1927/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tk3o5hkn/matplotlib_53b7f655efb14a6a9d86b117497e1927/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-sz1ykkr8
       cwd: /tmp/pip-install-tk3o5hkn/matplotlib_53b7f655efb14a6a9d86b117497e1927/
  Complete output (19 lines):
  
  Edit setup.cfg to change the build options; suppress output with --quiet.
  
  BUILDING MATPLOTLIB
    matplotlib: yes [3.3.4]
        python: yes [3.6.9 (default, Dec  8 2021, 21:08:43)  [GCC 8.4.0]]
      platform: yes [linux]
   sample_data: yes [installing]
         tests: no  [skipping due to configuration]
        macosx: no  [Mac OS-X only]
  
  running egg_info
  creating /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info
  writing /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/dependency_links.txt
  writing namespace_packages to /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/namespace_packages.txt
  writing requirements to /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/requires.txt
  writing top-level names to /tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-sz1ykkr8/matplotlib.egg-info/SOURCES.txt'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/22/d4/e7ca532e68a9357742604e1e4ae35d9c09a4a810de39a9d80402bd12f50f/matplotlib-3.3.4.tar.gz#sha256=3e477db76c22929e4c6876c44f88d790aacdf3c3f8f3a90cb1975c0bf37825b0 (from https://pypi.org/simple/matplotlib/) (requires-python:>=3.6). Command errored out with exit status -4: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement matplotlib==3.3.4 (from versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1rc1, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.2.0rc1, 2.2.0, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 3.0.0rc2, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0rc1, 3.1.0rc2, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0rc1, 3.2.0rc3, 3.2.0, 3.2.1, 3.2.2, 3.3.0rc1, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4)
ERROR: No matching distribution found for matplotlib==3.3.4

error

CodePudding user response:

It seems that your python packages have broken, There can be two ways to install matplotlib

Way-1: Try to install matplotlib in venv

Way-2: Uninstall python and then reinstall python again.

Note: In Second way, don't restart jetson until new python installed completely, because python3 is already comes with jetson, so if you will uninstall it and then restart jetson, it will not work fine.

CodePudding user response:

I solved this problem!!!!

This line was added to bashrc and the problem was solved.

export OPENBLAS_CORETYPE=ARMV8 python3

  • Related