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

Update build/pkgs/matplotlib/install-requires.txt and distros/conda.txt #33642

Closed
mkoeppe opened this issue Apr 4, 2022 · 29 comments
Closed

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 4, 2022

(from #33491 comment:6)

(from #33331): Failures with conda install:

  • matplotlib distutils classes
/usr/share/miniconda/envs/sage-build/lib/python3.8/site-packages/matplotlib/__init__.py:169: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      if LooseVersion(module.__version__) < minver:
    /usr/share/miniconda/envs/sage-build/lib/python3.8/site-packages/setuptools/_distutils/version.py:351: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      other = LooseVersion(other)

Should be fixed by matplotlib/matplotlib#21073, which is in included in matplotlib 3.5.1 (but for some reason conda installs only 3.3.2, to be investigated)

  • matplotlib colormaps
     sage.repl.rich_output.display_manager.RichReprWarning: Exception in _rich_repr_ while displaying object: cannot import name 'colormaps' from 'matplotlib' (/usr/share/miniconda/envs/sage-build/lib/python3.8/site-packages/matplotlib/__init__.py)

Probably introduced by #33491.

CC: @davidlowryduda @tobiasdiez @mwageringel @tscrim @dimpase @isuruf

Component: build

Author: Matthias Koeppe

Branch/Commit: aafa2d7

Reviewer: Dima Pasechnik, Tobias Diez

Issue created by migration from https://trac.sagemath.org/ticket/33642

@mkoeppe mkoeppe added this to the sage-9.6 milestone Apr 4, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2022

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2022

Commit: aeb30b7

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2022

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2022

New commits:

aeb30b7build/pkgs/matplotlib/install-requires.txt: Use matplotlib >=3.5.0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2022

Changed commit from aeb30b7 to 395e320

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

395e320build/pkgs/matplotlib/install-requires.txt: Use matplotlib >=3.5.1

@mkoeppe

This comment has been minimized.

@tobiasdiez
Copy link
Contributor

comment:6

The conda distribution file probably needs to be changed as well. However, requiring matplotlib >=3.5.1 with python < 3.10 doesn't seem to work with conda, or at least in my initial tests the python version always got upgraded as well (might be easy to fix, but I don't have the time right now to look closer at this).

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 5, 2022

comment:7

For now with conda, the updated install-requires will ensure that the upgraded package is installed with pip until conda packaging is updated

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 6, 2022

comment:8

Let's get this in please.

@dimpase
Copy link
Member

dimpase commented Apr 6, 2022

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Apr 6, 2022

comment:9

lgtm - just a version bump

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 6, 2022

comment:10

Thanks!

@tobiasdiez
Copy link
Contributor

comment:11

This is not really fixing the version conda picks. Conda still uses v3.3.2 on linux, see https://github.com/sagemath/sagetrac-mirror/runs/5871183030?check_suite_focus=true

So there should at least be a proper version requirement for conda, so that the environment file correctly setups up the conda environment.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

comment:12

Didn't you say in comment:6 that setting the version with conda does not work with python 3.10?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

comment:13

In the log of this run, pip correctly upgrades matplotlib:

2022-04-07T15:34:47.1650744Z   Attempting uninstall: matplotlib
2022-04-07T15:34:47.1663600Z     Found existing installation: matplotlib 3.3.2
2022-04-07T15:34:47.2697535Z     Uninstalling matplotlib-3.3.2:
...
2022-04-07T15:34:47.4717483Z       Successfully uninstalled matplotlib-3.3.2
2022-04-07T15:34:48.6427961Z 
...
2022-04-07T15:56:41.3898229Z     Installed /home/runner/work/sagetrac-mirror/sagetrac-mirror/src
2022-04-07T15:56:42.1172970Z Successfully installed fonttools-4.31.2 iniconfig-1.1.1 matplotlib-3.5.1 ptyprocess-0.5.1 pytest-7.1.1 rpy2-3.3.6 sagemath-standard-9.6b7 sphinx-4.4.0

@isuruf
Copy link
Member

isuruf commented Apr 7, 2022

comment:15

Can you give some small reproducer for this? When I install sage=9.5 conda package I always get matplotlib 3.5.1 regardless of the python version

@isuruf
Copy link
Member

isuruf commented Apr 7, 2022

comment:16

Nvm, I can reproduce

@isuruf
Copy link
Member

isuruf commented Apr 7, 2022

comment:17

Not sure exactly why this happens.
A workaround is to have matplotlib>=3.5.1 in build/pkgs/matploitlib/distros/conda.txt

@tobiasdiez
Copy link
Contributor

comment:18

Replying to @mkoeppe:

In the log of this run, pip correctly upgrades matplotlib:

2022-04-07T15:34:47.1650744Z   Attempting uninstall: matplotlib
2022-04-07T15:34:47.1663600Z     Found existing installation: matplotlib 3.3.2
2022-04-07T15:34:47.2697535Z     Uninstalling matplotlib-3.3.2:
...
2022-04-07T15:34:47.4717483Z       Successfully uninstalled matplotlib-3.3.2
2022-04-07T15:34:48.6427961Z 
...
2022-04-07T15:56:41.3898229Z     Installed /home/runner/work/sagetrac-mirror/sagetrac-mirror/src
2022-04-07T15:56:42.1172970Z Successfully installed fonttools-4.31.2 iniconfig-1.1.1 matplotlib-3.5.1 ptyprocess-0.5.1 pytest-7.1.1 rpy2-3.3.6 sagemath-standard-9.6b7 sphinx-4.4.0

But we want to use conda for managing the environment, otherwise wouldn't need to list the python packages as dependencies (since they would be installed by pip as well otherwise). So please add the version constraint that isuruf mentions above. Thanks

@mkoeppe mkoeppe changed the title Update build/pkgs/matplotlib/install-requires.txt Update build/pkgs/matplotlib/install-requires.txt and distros/conda.txt Apr 7, 2022
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 7, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

aafa2d7build/pkgs/matplotlib/distros/conda.txt: Set lower version bound

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 7, 2022

Changed commit from 395e320 to aafa2d7

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

Changed reviewer from Dima Pasechnik to Dima Pasechnik, Tobias Diez

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

comment:22

Replying to @tobiasdiez:

But we want to use conda for managing the environment

This is what we prefer, but it does work correctly to install dependencies with pip. Anyway, here it is.

@dimpase
Copy link
Member

dimpase commented Apr 7, 2022

comment:23

ok

@tobiasdiez
Copy link
Contributor

comment:24

Thanks! Looks good to me and seems to work well: https://github.com/sagemath/sagetrac-mirror/runs/5876791740?check_suite_focus=true

By the way, there are more conda-installed packages that are later replaced by pip: ptyprocess, iniconfig, sphinx, pytest, rpy2. I'll add them to #33331.

@mwageringel
Copy link

comment:25

Thanks for resolving this problem.

@vbraun
Copy link
Member

vbraun commented Apr 10, 2022

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

No branches or pull requests

6 participants