Installing matplotlib==2.2.2 error

1,809 views
Skip to first unread message

Claudio Pascalis

unread,
Mar 3, 2021, 5:54:40 AM3/3/21
to QATrack+

Hi,

we are trying to install qatrack+ on a Ubuntu Linux Machine Ubuntu 20.04.2

We followed the install instructions from https://docs.qatrackplus.com until the following command:

pip install -r requirements/postgres.txt

Which results in following error message

Collecting matplotlib==2.2.2
  Using cached matplotlib-2.2.2.tar.gz (37.3 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/linadm/venvs/qatrack3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5fj0z9wz/matplotlib_8ef4825659f14da6923129415c8f9a46/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5fj0z9wz/matplotlib_8ef4825659f14da6923129415c8f9a46/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ikd910a8
         cwd: /tmp/pip-install-5fj0z9wz/matplotlib_8ef4825659f14da6923129415c8f9a46/
    Complete output (62 lines):
    ============================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [2.2.2]
                    python: yes [3.8.5 (default, Jan 27 2021, 15:41:15)  [GCC
                            9.3.0]]
                  platform: yes [linux]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.20.1]
          install_requires: yes [handled by setuptools]
                    libagg: yes [pkg-config information for 'libagg' could not
                            be found. Using local copy.]
                  freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                            could not be found.  You may need to install the
                            development package.]
                       png: no  [pkg-config information for 'libpng' could not
                            be found.]
                     qhull: yes [pkg-config information for 'libqhull' could not
                            be found. Using local copy.]

    OPTIONAL SUBPACKAGES
               sample_data: yes [installing]
                  toolkits: yes [installing]
                     tests: no  [skipping due to configuration]
            toolkits_tests: no  [skipping due to configuration]

    OPTIONAL BACKEND EXTENSIONS
                    macosx: no  [Mac OS-X only]
                    qt5agg: no  [PySide2 not found; PyQt5 not found]
                    qt4agg: no  [PySide not found; PyQt4 not found]
                   gtk3agg: no  [Requires pygobject to be installed.]
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5fj0z9wz/matplotlib_8ef4825659f14da6923129415c8f9a46/setup.py", line 197, in <module>
        msg = pkg.install_help_msg()
      File "/tmp/pip-install-5fj0z9wz/matplotlib_8ef4825659f14da6923129415c8f9a46/setupext.py", line 592, in install_help_msg
        release = platform.linux_distribution()[0].lower()
    AttributeError: module 'platform' has no attribute 'linux_distribution'
                 gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                    gtkagg: no  [Requires pygtk]
                     tkagg: yes [installing; run-time loading from Python Tcl /
                            Tk]
                     wxagg: no  [requires wxPython]
                       gtk: no  [Requires pygtk]
                       agg: yes [installing]
                     cairo: no  [cairocffi or pycairo not found]
                 windowing: no  [Microsoft Windows only]

    OPTIONAL LATEX DEPENDENCIES
                    dvipng: no
               ghostscript: no
                     latex: no
                   pdftops: no

    OPTIONAL PACKAGE DATA
                      dlls: no  [skipping due to configuration]

    ============================================================================
                            * The following required packages can not be built:
                            * freetype, png
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ec/ed/46b835da53b7ed05bd4c6cae293f13ec26e877d2e490a53a709915a9dcb7/matplotlib-2.2.2.tar.gz#sha256=4dc7ef528aad21f22be85e95725234c5178c0f938e2228ca76640e5e84d8cde8 (from https://pypi.org/simple/matplotlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ERROR: Could not find a version that satisfies the requirement matplotlib==2.2.2
ERROR: No matching distribution found for matplotlib==2.2.2

Any help is appreciated

Cheers


tbe...@gmail.com

unread,
Mar 3, 2021, 8:51:58 AM3/3/21
to QATrack+
Hi,

try installing libfreetype-dev and libpng-dev and then try pip install -r requirements/postgres.txt again.
sudo apt install libfreetype-dev libpng-dev

Also double check that you are in your virtual environment (source ~/venvs/qatrack31/bin/activate)

with kind regards
Thomas

Randle Taylor

unread,
Mar 3, 2021, 8:59:11 AM3/3/21
to tbe...@gmail.com, QATrack+
HI Claudio,

Since you're doing a new installation, I would recommend you start with the release candidate for v3.1 rather than the latest version:  https://docs.qatrackplus.com/en/v3.1.0rc1.2/install/linux.html . Otherwise, as Thomas said, installing freetype and png support should allow mpl to build.

RT

--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qatrack/a33678d4-f26c-4040-9792-e98f97a5bfaan%40googlegroups.com.

Carolyn W

unread,
Mar 19, 2021, 10:17:01 PM3/19/21
to QATrack+
Hi all, 

I am also trying a new install on Ubuntu. 

I got the same error and tried as suggested above installing freetype and png support. I was still getting an error with freetype, managed to get past it with also using:     

sudo apt-get install pkg-config

 Though it looks like I am now getting an error with scipy farther along in  pip install -r requirements/postgres.txt

I am curious if you tried this solution or using v3.1 and had any luck?

Thank you, 
Carolyn

Randle Taylor

unread,
Mar 19, 2021, 10:48:33 PM3/19/21
to Carolyn W, QATrack+
Hi Carolyn,

What error are you getting?  Either way if you're doing a fresh install I would recommend just going with v3.1 at this point.  It's quite stable and will be a simple update to the final release for you when it's available.

Randy

Carolyn W

unread,
Mar 20, 2021, 8:57:21 PM3/20/21
to QATrack+
Hi Randy, 

Okay - yes I will likely start over. 

This is the error:

ERROR: Command errored out with exit status 1:
     command: /home/carolyn/venvs/qatrack3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1i0sohm0/install-record.txt --single-version-externally-managed --compile --install-headers /home/carolyn/venvs/qatrack3/include/site/python3.8/scipy
         cwd: /tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/
    Complete output (186 lines):
    /tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)


    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/home/carolyn/venvs/qatrack3/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
      NOT AVAILABLE

    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/home/carolyn/venvs/qatrack3/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
      NOT AVAILABLE

    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/home/carolyn/venvs/qatrack3/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
    customize UnixCCompiler
      libraries satlas,satlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /home/carolyn/venvs/qatrack3/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    accelerate_info:
      NOT AVAILABLE

    /home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/system_info.py:625: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
    customize UnixCCompiler
      libraries lapack not found in ['/home/carolyn/venvs/qatrack3/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
      NOT AVAILABLE

    /home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/system_info.py:625: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE

    /home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/system_info.py:625: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE

    Running from scipy source directory.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py", line 474, in <module>
        setup_package()
      File "/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py", line 470, in setup_package
        setup(**metadata)
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py", line 388, in configuration
        config.add_subpackage('scipy')
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 1032, in add_subpackage
        config_list = self.get_subpackage(subpackage_name, subpackage_path,
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
        config = self._get_configuration_from_setup_py(
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 940, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy/setup.py", line 15, in configuration
        config.add_subpackage('linalg')
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 1032, in add_subpackage
        config_list = self.get_subpackage(subpackage_name, subpackage_path,
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
        config = self._get_configuration_from_setup_py(
      File "/home/carolyn/venvs/qatrack3/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 940, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy/linalg/setup.py", line 19, in configuration
        raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/carolyn/venvs/qatrack3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zj3g3jwe/scipy_7c81343df73d456e9ce843ba51aadca9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1i0sohm0/install-record.txt --single-version-externally-managed --compile --install-headers /home/carolyn/venvs/qatrack3/include/site/python3.8/scipy Check the logs for full command output.

Thank you so much, 
Carolyn

Carolyn W

unread,
Mar 21, 2021, 8:00:06 PM3/21/21
to QATrack+
Hi Randy, 

Do not worry about the error. I started over with  v3.1.0RC3 and it is up and running for me! 
Thank you so much!
- Carolyn

Reply all
Reply to author
Forward
0 new messages