首页 > 解决方案 > 使用 Anaconda 安装包失败

问题描述

我想安装 PythonOCC。从官方文档(http://www.pythonocc.org/download/),我看到我必须使用:

conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1

因此,我从基本终端输入了该命令,但我遇到了一些冲突,我无法解释它们或找到解决方案,因为这是我第一次使用 Anaconda。我在 Ubuntu Linux 20.04 上。

这是错误消息:

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 the existing python installation in your environment:

Specifications:

  - pythonocc-core==0.18.1 -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/linux-64::__cuda==10.2=0
  - feature:|@/linux-64::__cuda==10.2=0

Your installed CUDA driver is: 10.2

关于如何从这里开始的任何想法?

编辑:遵循用户的 vc 74 建议后,我尝试了以下命令:

conda create -n py36 python=3.6
conda activate py36
conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1

这是我得到的新冲突:

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 versionsThe following specifications were found to be incompatible with your CUDA driver:

  - feature:/linux-64::__cuda==10.2=0

Your installed CUDA driver is: 10.2

标签: pythoncondapythonocc

解决方案


根据GitHub 上的 Conda UnsatisfiableError,这是包本身的 meta.yaml 的问题,根本不是你的错。我建议向PythonOCC模块的制造商开一张支持票。然后他们将能够解决问题。


推荐阅读