无法在 python 3.12 中安装 matplotlib

Ami*_*eri 2 python matplotlib anaconda conda mamba

当我尝试使用miniconda 包管理器matplotlib 3.8.0在 conda 环境中安装时,出现以下错误:

\n
Solving environment: / warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE\nfailed\n\nLibMambaUnsatisfiableError: Encountered problems while solving:\n  - cannot install both pin-1-1 and pin-1-1\n  - nothing provides numpy 1.10* needed by matplotlib-1.5.3-np110py34_1\n\nCould not solve for environment specs\nThe following packages are incompatible\n\xe2\x94\x9c\xe2\x94\x80 matplotlib is installable with the potential options\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 numpy 1.10* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python 3.4*  but there are no viable options\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 python 3.4.5 would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 vc 10.* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 python 3.4.5 would require\n\xe2\x94\x82  \xe2\x94\x82        \xe2\x94\x94\xe2\x94\x80 vs2010_runtime, which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 pyqt 4.11.* , which requires\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 qt 4.8.* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|2.2.4] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=2.7,<2.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|3.3.4] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.6,<3.7.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.1.2|2.2.2|...|3.5.3] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.7,<3.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.2.4|3.1.1|...|3.7.3] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.8,<3.9.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 2.2.5 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib-base >=2.2.5,<2.2.6.0a0  with the potential options\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base 2.2.5 would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=2.7,<2.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.6,<3.7.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.7,<3.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.8,<3.9.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 matplotlib-base [2.2.5|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82        \xe2\x94\x94\xe2\x94\x80 python >=3.9,<3.10.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.2.0|3.2.1|3.2.2|3.3.0|3.3.1] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 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;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 3.3.2 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib-base >=3.3.2,<3.3.3.0a0 , which can be installed (as previously explained);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.3.2|3.3.3|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.9,<3.10.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.4.3|3.5.0|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.10,<3.11.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.6.1|3.6.2|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.11,<3.12.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|3.0.0] would require\n\xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 python >=3.5,<3.6.0a0 , which can be installed;\n\xe2\x94\x94\xe2\x94\x80 pin-1 is not installable because there are no viable options\n   \xe2\x94\x9c\xe2\x94\x80 pin-1 1 would require\n   \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python 3.12.* , which conflicts with any installable versions previously reported;\n   \xe2\x94\x94\xe2\x94\x80 pin-1 1 would require\n      \xe2\x94\x94\xe2\x94\x80 python 3.12.* , which conflicts with any installable versions previously reported.\n\nPins seem to be involved in the conflict. Currently pinned specs:\n - python 3.12.* (labeled as 'pin-1')\n\n\n\n(datasc) C:\\Users\\USER>conda install matplotlib -c conda-forge\nChannels:\n - conda-forge\n - defaults\nPlatform: win-64\nCollecting package metadata (repodata.json): done\nSolving environment: \\ warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE\nfailed\n\nLibMambaUnsatisfiableError: Encountered problems while solving:\n  - cannot install both pin-1-1 and pin-1-1\n  - nothing provides numpy 1.10* needed by matplotlib-1.5.3-np110py34_1\n\nCould not solve for environment specs\nThe following packages are incompatible\n\xe2\x94\x9c\xe2\x94\x80 matplotlib is installable with the potential options\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 numpy 1.10* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python 3.4*  but there are no viable options\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 python 3.4.5 would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 vc 10.* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 python 3.4.5 would require\n\xe2\x94\x82  \xe2\x94\x82        \xe2\x94\x94\xe2\x94\x80 vs2010_runtime, which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 1.5.3 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 pyqt 4.11.* , which requires\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 qt 4.8.* , which does not exist (perhaps a missing channel);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|2.2.4] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=2.7,<2.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|3.3.4] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.6,<3.7.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.1.2|2.2.2|...|3.5.3] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.7,<3.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [2.2.4|3.1.1|...|3.7.3] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.8,<3.9.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 2.2.5 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib-base >=2.2.5,<2.2.6.0a0  with the potential options\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base 2.2.5 would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=2.7,<2.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.6,<3.7.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.7,<3.8.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80 matplotlib-base [2.2.5|3.2.0|...|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.8,<3.9.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 matplotlib-base [2.2.5|3.3.2] would require\n\xe2\x94\x82  \xe2\x94\x82        \xe2\x94\x94\xe2\x94\x80 python >=3.9,<3.10.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.2.0|3.2.1|3.2.2|3.3.0|3.3.1] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 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;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib 3.3.2 would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib-base >=3.3.2,<3.3.3.0a0 , which can be installed (as previously explained);\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.3.2|3.3.3|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.9,<3.10.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.4.3|3.5.0|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.10,<3.11.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x9c\xe2\x94\x80 matplotlib [3.6.1|3.6.2|...|3.8.0] would require\n\xe2\x94\x82  \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python >=3.11,<3.12.0a0 , which can be installed;\n\xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 matplotlib [2.0.2|2.1.0|...|3.0.0] would require\n\xe2\x94\x82     \xe2\x94\x94\xe2\x94\x80 python >=3.5,<3.6.0a0 , which can be installed;\n\xe2\x94\x94\xe2\x94\x80 pin-1 is not installable because there are no viable options\n   \xe2\x94\x9c\xe2\x94\x80 pin-1 1 would require\n   \xe2\x94\x82  \xe2\x94\x94\xe2\x94\x80 python 3.12.* , which conflicts with any installable versions previously reported;\n   \xe2\x94\x94\xe2\x94\x80 pin-1 1 would require\n      \xe2\x94\x94\xe2\x94\x80 python 3.12.* , which conflicts with any installable versions previously reported.\n\nPins seem to be involved in the conflict. Currently pinned specs:\n - python 3.12.* (labeled as 'pin-1')\n
Run Code Online (Sandbox Code Playgroud)\n

我已将解算器设置为libmamba,这就是消息看起来有点不同的原因。

\n

除了将我的 python 降级为 之外,还有其他方法吗3.9?我宁愿使用最新版本3.12.0

\n

mad*_*cht 6

截至撰写问题时,python 3.12 才发布几天。!您不必将python降级到 3.9。

  • 它是conda。您只需使用 python 3.9 的另一个环境并安装所需的任何内容。这就是Conda我们设计的目的。
  • Matplotlib 已经可以很好地与Python 3.11. 没必要降到3.9
  • 确实,这才刚过去几天。给它一些时间。保留 python 3.11 环境并将其用于任何您想要使用 matplotlib 的地方。为 Python 3.12 的第一步保留 Python 3.12 环境,并时不时地尝试安装 matplotlib。在某个时候,matplotlib会在那里。再等几天就好了。