Cannot install matplotlib in python 3.12

8.4k views Asked by At

When i try to install matplotlib 3.8.0 in my conda environment with miniconda package manager i get the following error :

Solving environment: / warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - cannot install both pin-1-1 and pin-1-1
  - nothing provides numpy 1.10* needed by matplotlib-1.5.3-np110py34_1

Could not solve for environment specs
The following packages are incompatible
├─ matplotlib is installable with the potential options
│  ├─ matplotlib 1.5.3 would require
│  │  └─ numpy 1.10* , which does not exist (perhaps a missing channel);
│  ├─ matplotlib 1.5.3 would require
│  │  └─ python 3.4*  but there are no viable options
│  │     ├─ python 3.4.5 would require
│  │     │  └─ vc 10.* , which does not exist (perhaps a missing channel);
│  │     └─ python 3.4.5 would require
│  │        └─ vs2010_runtime, which does not exist (perhaps a missing channel);
│  ├─ matplotlib 1.5.3 would require
│  │  └─ pyqt 4.11.* , which requires
│  │     └─ qt 4.8.* , which does not exist (perhaps a missing channel);
│  ├─ matplotlib [2.0.2|2.1.0|...|2.2.4] would require
│  │  └─ python >=2.7,<2.8.0a0 , which can be installed;
│  ├─ matplotlib [2.0.2|2.1.0|...|3.3.4] would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ matplotlib [2.1.2|2.2.2|...|3.5.3] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ matplotlib [2.2.4|3.1.1|...|3.7.3] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ matplotlib 2.2.5 would require
│  │  └─ matplotlib-base >=2.2.5,<2.2.6.0a0  with the potential options
│  │     ├─ matplotlib-base 2.2.5 would require
│  │     │  └─ python >=2.7,<2.8.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  │     └─ matplotlib-base [2.2.5|3.3.2] would require
│  │        └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ matplotlib [3.2.0|3.2.1|3.2.2|3.3.0|3.3.1] would require
│  │  └─ matplotlib-base [>=3.2.0,<3.2.1.0a0 |>=3.2.1,<3.2.2.0a0 |>=3.2.2,<3.2.3.0a0 |>=3.3.0,<3.3.1.0a0 |>=3.3.1,<3.3.2.0a0 ], whic;
│  ├─ matplotlib 3.3.2 would require
│  │  └─ matplotlib-base >=3.3.2,<3.3.3.0a0 , which can be installed (as previously explained);
│  ├─ matplotlib [3.3.2|3.3.3|...|3.8.0] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ matplotlib [3.4.3|3.5.0|...|3.8.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ matplotlib [3.6.1|3.6.2|...|3.8.0] would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  └─ matplotlib [2.0.2|2.1.0|...|3.0.0] would require
│     └─ python >=3.5,<3.6.0a0 , which can be installed;
└─ pin-1 is not installable because there are no viable options
   ├─ pin-1 1 would require
   │  └─ python 3.12.* , which conflicts with any installable versions previously reported;
   └─ pin-1 1 would require
      └─ python 3.12.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')



(datasc) C:\Users\USER>conda install matplotlib -c conda-forge
Channels:
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: \ warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - cannot install both pin-1-1 and pin-1-1
  - nothing provides numpy 1.10* needed by matplotlib-1.5.3-np110py34_1

Could not solve for environment specs
The following packages are incompatible
├─ matplotlib is installable with the potential options
│  ├─ matplotlib 1.5.3 would require
│  │  └─ numpy 1.10* , which does not exist (perhaps a missing channel);
│  ├─ matplotlib 1.5.3 would require
│  │  └─ python 3.4*  but there are no viable options
│  │     ├─ python 3.4.5 would require
│  │     │  └─ vc 10.* , which does not exist (perhaps a missing channel);
│  │     └─ python 3.4.5 would require
│  │        └─ vs2010_runtime, which does not exist (perhaps a missing channel);
│  ├─ matplotlib 1.5.3 would require
│  │  └─ pyqt 4.11.* , which requires
│  │     └─ qt 4.8.* , which does not exist (perhaps a missing channel);
│  ├─ matplotlib [2.0.2|2.1.0|...|2.2.4] would require
│  │  └─ python >=2.7,<2.8.0a0 , which can be installed;
│  ├─ matplotlib [2.0.2|2.1.0|...|3.3.4] would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ matplotlib [2.1.2|2.2.2|...|3.5.3] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ matplotlib [2.2.4|3.1.1|...|3.7.3] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ matplotlib 2.2.5 would require
│  │  └─ matplotlib-base >=2.2.5,<2.2.6.0a0  with the potential options
│  │     ├─ matplotlib-base 2.2.5 would require
│  │     │  └─ python >=2.7,<2.8.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  │     ├─ matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require
│  │     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  │     └─ matplotlib-base [2.2.5|3.3.2] would require
│  │        └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ matplotlib [3.2.0|3.2.1|3.2.2|3.3.0|3.3.1] would require
│  │  └─ matplotlib-base [>=3.2.0,<3.2.1.0a0 |>=3.2.1,<3.2.2.0a0 |>=3.2.2,<3.2.3.0a0 |>=3.3.0,<3.3.1.0a0 |>=3.3.1,<3.3.2.0a0 ], whic;
│  ├─ matplotlib 3.3.2 would require
│  │  └─ matplotlib-base >=3.3.2,<3.3.3.0a0 , which can be installed (as previously explained);
│  ├─ matplotlib [3.3.2|3.3.3|...|3.8.0] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ matplotlib [3.4.3|3.5.0|...|3.8.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ matplotlib [3.6.1|3.6.2|...|3.8.0] would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  └─ matplotlib [2.0.2|2.1.0|...|3.0.0] would require
│     └─ python >=3.5,<3.6.0a0 , which can be installed;
└─ pin-1 is not installable because there are no viable options
   ├─ pin-1 1 would require
   │  └─ python 3.12.* , which conflicts with any installable versions previously reported;
   └─ pin-1 1 would require
      └─ python 3.12.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')

I have set my solver to libmamba so that's why the message looks a bit different.

Isn't there any other way rather than downgrading my python to 3.9? I'd rather use the latest version 3.12.0.

2

There are 2 answers

0
maddes8cht On BEST ANSWER

As of the writing of the question, python 3.12 is just a few days old. Days! You don't have to downgrade your python to 3.9.

  • It's conda. You just use another enviroronment for a python 3.9 and install whatever is needed. That's what Conda is made for.
  • Matplotlib already works pretty fine with Python 3.11. No need to go down to 3.9
  • Really, it's just a few days old. Give it some time. Keep your python 3.11 environment and use it for whatever you want to use matplotlib. Keep a Python 3.12 environment for your very first steps in Python 3.12, and try to install matplotlib now and then. And at some point, matplotlib will be there. Just wait a few days more.
0
Trenton McKinney On

Create conda Environment

conda create -n py312 python=3.12 matplotlib=3.8.0 seaborn=0.13 pandas=2.1.1

enter image description here

JupyterLab Selected Kernel

enter image description here

.condarc file

  • The following channels in .condarc remove the need to specify a channel with -c
channels:
  - defaults
  - conda-forge
report_errors: true