我正在Ubuntu 18.04系统上为Python3.8复制我的Python3.7Conda环境。我从一个简单的jane Conda环境开始,唯一的需求是python=3.8。然后,我开始从3.7环境中安装软件包。
大部分过程都很顺利,但matplotlib失败了。Conda搜索显示matplotlib的3.8版本,但conda install命令无法解决一组不冲突的程序包。Numpy、ipython等都安装得很好。在旋转了很多次之后,它抱怨说:
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package python conflicts for:
python=3.8
Package pip conflicts for:
python=3.8 -> pip
matplotlib -> python[version='>=3.7,<3.8.0a0'] -> pip
Package certifi conflicts for:
python=3.8 -> pip -> setuptools -> certifi[version='>=2016.09|>=2016.9.26']
Package wheel conflicts for:
python=3.8 -> pip -> wheel
matplotlib -> python[version='>=3.7,<3.8.0a0'] -> pip -> wheel
Package python-dateutil conflicts for:
matplotlib -> python-dateutil
Package ca-certificates conflicts for:
matplotlib -> setuptools -> ca-certificates
python=3.8 -> openssl[version='>=1.1.1d,<1.1.2a'] -> ca-certificates
Package setuptools conflicts for:
python=3.8 -> pip -> setuptools
matplotlib -> setuptools我说不清这是什么意思。也许matplotlib本身的版本依赖是不正确的,或者Python >= 3.8.0a0没有官方的matplotlib Conda包?Conda search建议应该有一些东西:
% conda search matplotlib
...
matplotlib 3.1.1 py38h5429711_0 pkgs/main以下是conda info的输出:
active environment : python38
active env location : /home/skip/miniconda3/envs/python38
shell level : 2
user config file : /home/skip/.condarc
populated config files : /home/skip/.condarc
conda version : 4.8.1
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages : __glibc=2.27
base environment : /home/skip/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/skip/miniconda3/pkgs
/home/skip/.conda/pkgs
envs directories : /home/skip/miniconda3/envs
/home/skip/.conda/envs
platform : linux-64
user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-74-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 1000:1000
netrc file : /home/skip/.netrc
offline mode : False不确定为什么它报告3.7.3为Python版本。也许这是在根环境中?我显然已经安装了3.8.1:
(python38) polly% python
Python 3.8.1 (default, Jan 8 2020, 22:29:32)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>发布于 2021-02-28 22:13:28
conda install -c conda-forge matplotlib这对我很有效。我的环境是python 3.8和Ubuntu 18.04。
https://stackoverflow.com/questions/59723500
复制相似问题