conda 安装 psycopg2 错误

Bri*_*son 9 python installation psycopg2 anaconda

运行 Catalina 的新 macbookpro。使用自制软件安装 anaconda。尝试使用该命令安装 psycopg2conda install -c anaconda psycopg2但由于包冲突而失败。以下是尝试安装的一些输出:

$ conda install -c anaconda psycopg2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                \ 

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package six conflicts for:
pyopenssl -> cryptography[version='>=2.8'] -> six[version='>=1.4.1']
pytest-doctestplus -> pytest[version='>=3.0'] -> six[version='>=1.10.0']
python-dateutil -> six[version='>=1.5']
nltk -> six
Run Code Online (Sandbox Code Playgroud)

关于发生了什么或如何解决的任何想法?

小智 6

原因可能是 [anaconda==2020.02] 和 [70+ PACKAGES] 之间存在太多冲突,请尝试以下对我有用的方法:

conda -V conda update -n 基础 conda

确保您使用的是 conda 4.8.2 版本然后

conda update --all

那么以下软件包将被降级:

蟒蛇 2020.02-py37_0 --> 自定义 py37_1

然后

conda install psycopg2

然后将安装包 libpq,psycopg2,将更新一些包,一些包将被更高优先级的通道取代。

  • 正确的命令是“conda update --all” (3认同)