Skip to content

Error installing matplotlib-3.3.1 using pip due to old version of certifi on conda environment #18337

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

Closed
asdf8601 opened this issue Aug 24, 2020 · 6 comments · Fixed by #18636
Labels
Community support Users in need of help.
Milestone

Comments

@asdf8601
Copy link

asdf8601 commented Aug 24, 2020

Hi!

I'm using mapltolib on CICD (linux) and I found this unexpected behavior. When I install matplotlib-3.3.1 on a conda environment with an older version of certifi (required by conda), the installation process fails. I'm wondering if this is the expected behavior or not.

I've checked the setup.py and I saw that matplotlib requires certifi>=2020.06.20, so if I have an older version installed the error occurs.

MWE

Here is an example of my workflow.

$ docker run -it intelpython/intelpython3_core:2019.4
(base) root@9c3da40a58ba:/# pip install matplotlib

Traceback

$ docker run -it intelpython/intelpython3_core:2019.4
Unable to find image 'intelpython/intelpython3_core:2019.4' locally
2019.4: Pulling from intelpython/intelpython3_core
cc1a78bfd46b: Pull complete
49eab01d36f3: Pull complete
c2c2cfea0213: Pull complete
419499c9a4cf: Pull complete
f7550509e92e: Pull complete
4d32c595223c: Pull complete
Digest: sha256:fb45b594cb3e6960311157393eda3b86225f7446e07768a96517d3c2b314bc2a
Status: Downloaded newer image for intelpython/intelpython3_core:2019.4

(base) root@9c3da40a58ba:/# pip list
Package      Version
------------ ---------
asn1crypto   0.24.0
certifi      2018.1.18
cffi         1.11.5
chardet      3.0.4
conda        4.6.14
cryptography 2.2.2
idna         2.6
mkl-fft      1.0.13
mkl-random   1.0.4
mkl-service  1.0.0
numpy        1.16.2
pip          10.0.1
pycosat      0.6.3
pycparser    2.18
pyOpenSSL    18.0.0
PySocks      1.6.8
PyYAML       4.1
requests     2.18.4
ruamel-yaml  0.15.37
scipy        1.2.1
setuptools   39.2.0
six          1.11.0
TBB          0.1
urllib3      1.22
wheel        0.31.1
You are using pip version 10.0.1, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

(base) root@9c3da40a58ba:/# pip install matplotlib
Collecting matplotlib
  Downloading https://files.pythonhosted.org/packages/96/a7/b6fa244fd8a8814ef9408c8a5a7e4ed0340e232a6f0ce2046b42e50672c0/matplotlib-3.3.1-cp36-cp36m-manylinux1_x86_64.whl (11.6MB)
    100% |████████████████████████████████| 11.6MB 2.5MB/s
Collecting certifi>=2020.06.20 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156kB)
    100% |████████████████████████████████| 163kB 9.9MB/s
Collecting kiwisolver>=1.0.1 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/ae/23/147de658aabbf968324551ea22c0c13a00284c4ef49a77002e91f79657b7/kiwisolver-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (88kB)
    100% |████████████████████████████████| 92kB 6.5MB/s
Requirement already satisfied: numpy>=1.15 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (1.16.2)
Collecting cycler>=0.10 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67kB)
    100% |████████████████████████████████| 71kB 7.4MB/s
Collecting pillow>=6.2.0 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/30/bf/92385b4262178ca22b34f82e0e09c2922eb351fe39f3cc7b8ba9ea555b41/Pillow-7.2.0-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
    100% |████████████████████████████████| 2.2MB 6.6MB/s
Collecting python-dateutil>=2.1 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
    100% |████████████████████████████████| 235kB 8.8MB/s
Requirement already satisfied: six in /opt/conda/lib/python3.6/site-packages (from cycler>=0.10->matplotlib) (1.11.0)
mkl-service 1.0.0 requires cython, which is not installed.
Installing collected packages: certifi, kiwisolver, cycler, pyparsing, pillow, python-dateutil, matplotlib
  Found existing installation: certifi 2018.1.18
Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You are using pip version 10.0.1, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(base) root@9c3da40a58ba:/# exit
@asdf8601 asdf8601 added the Community support Users in need of help. label Aug 24, 2020
@dopplershift
Copy link
Contributor

If you have a conda environment, why aren't you using conda to install matplotlib?

@asdf8601
Copy link
Author

asdf8601 commented Aug 24, 2020

Hi @dopplershift,

Thank you for your reply. The main reason it's because I want to use conda to handle environments and I prefer using pip for package management.

shouldn't I use pip to install packages under conda environments?

I only wanted to point out this behavior. Anyway, I've change my workflow to avoid conda.

@dopplershift
Copy link
Contributor

Well, conda has better dependency tracking and install, so it's more likely to be able to update things and keep a consistent environment.

I'm not sure about matplotlib requiring the 2020.06.20 version of certifi, but I think the error that came out was reasonable.

@jklymak
Copy link
Member

jklymak commented Aug 24, 2020

This was a new dependency as of #18225 (3.3.1). Not sure if it needs to be so strict? @QuLogic ?

@QuLogic
Copy link
Member

QuLogic commented Oct 2, 2020

No, not likely, it's just the one I tested. As a pure Python package, it didn't seem too bad to require something new-ish.

@tacaswell
Copy link
Member

We should not be requriing certif to install the wheel though, PR coming..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community support Users in need of help.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants