【发布时间】:2020-12-25 16:58:00
【问题描述】:
我想安装 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
【问题讨论】:
-
问题非常明确,pythonocc-core 不适用于 python 3.8。如果3.8不是强制的,可以切换到python 3.6(
conda create -n py36 python=3.6) -
所以我运行您刚刚提供的命令,然后运行 'conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1' ?
-
conda create -n py36 python=3.6conda activate py36conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1看看进展如何 -
谢谢。我现在只有一个冲突。我用最新的冲突编辑了问题。
-
所以我从基本终端输入了那个命令不要那样做!为每个项目/应用程序创建一个新环境,不要弄乱基础环境。