Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.8 install #374

Closed
znicholls opened this issue May 10, 2020 · 4 comments · Fixed by #380
Closed

Python 3.8 install #374

znicholls opened this issue May 10, 2020 · 4 comments · Fixed by #380

Comments

@znicholls
Copy link
Collaborator

Matplotlib 3.0.2 was released before matplotlib were packaging Python 3.8 wheels. As a result, it's not trivial to pip install pyam in a Python 3.8 environment. Is it possible to remove this matplotlib pinning and hence support (one-line installs with) Python 3.8?

$ pip install 'pyam-iamc==0.5.0'
Collecting pyam-iamc==0.5.0
  Using cached pyam_iamc-0.5.0-py2.py3-none-any.whl (65 kB)
Collecting seaborn
  Using cached seaborn-0.10.1-py3-none-any.whl (215 kB)
Collecting xlsxwriter
  Using cached XlsxWriter-1.2.8-py2.py3-none-any.whl (141 kB)
Collecting numpy
  Downloading numpy-1.18.4-cp38-cp38-macosx_10_9_x86_64.whl (15.2 MB)
     |████████████████████████████████| 15.2 MB 2.7 MB/s 
Collecting requests
  Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting argparse
  Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Collecting PyYAML
  Using cached PyYAML-5.3.1.tar.gz (269 kB)
Collecting xlrd
  Using cached xlrd-1.2.0-py2.py3-none-any.whl (103 kB)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting pandas>=0.25.0
  Downloading pandas-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl (10.2 MB)
     |████████████████████████████████| 10.2 MB 2.0 MB/s 
Collecting matplotlib<=3.0.2
  Downloading matplotlib-3.0.2.tar.gz (36.5 MB)
     |████████████████████████████████| 36.5 MB 143 kB/s 
    ERROR: Command errored out with exit status 1:
     command: /Users/znicholls/miniconda3/envs/py38/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tw/c4s_0zhd4f99j57w6b9hh9p5bjhl58/T/pip-install-fji9o3fo/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/tw/c4s_0zhd4f99j57w6b9hh9p5bjhl58/T/pip-install-fji9o3fo/matplotlib/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 /private/var/folders/tw/c4s_0zhd4f99j57w6b9hh9p5bjhl58/T/pip-pip-egg-info-g2fdudps
         cwd: /private/var/folders/tw/c4s_0zhd4f99j57w6b9hh9p5bjhl58/T/pip-install-fji9o3fo/matplotlib/
    Complete output (46 lines):
    IMPORTANT WARNING:
        pkg-config is not installed.
        matplotlib may not be able to find some of its dependencies
    ============================================================================
    Edit setup.cfg to change the build options
    
    BUILDING MATPLOTLIB
                matplotlib: yes [3.0.2]
                    python: yes [3.8.2 | packaged by conda-forge | (default, Apr
                            24 2020, 07:56:27)  [Clang 9.0.1 ]]
                  platform: yes [darwin]
    
    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [not found. pip may install it below.]
          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: yes [version 1.6.37]
                     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
                       agg: yes [installing]
                     tkagg: yes [installing; run-time loading from Python Tcl /
                            Tk]
                    macosx: yes [installing, darwin]
                 windowing: no  [Microsoft Windows only]
    
    OPTIONAL PACKAGE DATA
                      dlls: no  [skipping due to configuration]
    
    ============================================================================
                            * The following required packages can not be built:
                            * freetype
                            * Try installing freetype with `brew install
                            * freetype` and pkg-config with `brew install pkg-
                            * config`
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@znicholls
Copy link
Collaborator Author

@gidden and @danielhuppmann maybe one for you as the plotting/packaging experts?

@danielhuppmann
Copy link
Member

Unfortunately, some features of the plotting library use matplotlib internals, so just removing the pin won't work, see related issues #266, #281, #296, #327.

@gidden, any chance that you look into this?

@gidden
Copy link
Member

gidden commented May 11, 2020 via email

@danielhuppmann
Copy link
Member

Not sure if I fully get this suggestion - wouldn't that mean that using a "standard-install" to do plots would fail (raise errors)? Don't think that this is a decent user experience...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants