简体   繁体   English

如何在 Linux 上 conda 安装 openAI gym - Package 冲突

[英]How to conda install openAI gym on Linux - Package Conflicts

I am trying to install the gym package in conda for Linux.我正在尝试在 conda 中为 Linux 安装健身房 package。 I have created a virtual environment and am using the following command to try and install:我已经创建了一个虚拟环境,并正在使用以下命令来尝试安装:

(gym_env) [quantrill@baesvlfil003 ~]$ conda install --name gym_env -c hcc gym

But am getting the following issue:但是我遇到了以下问题:

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.                                                                                                        failed

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



Package libgcc-ng conflicts for:
python=3.6 -> libgcc-ng[version='>=7.2.0|>=7.3.0']
Package libstdcxx-ng conflicts for:
python=3.6 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
Package xz conflicts for:
python=3.6 -> xz[version='>=5.2.3,<6.0a0|>=5.2.4,<6.0a0']
Package libffi conflicts for:
python=3.6 -> libffi[version='3.2.*|>=3.2.1,<4.0a0']
Package sqlite conflicts for:
python=3.6 -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.24.0,<4.0a0|>=3.25.2,<4.0a0|>=3.26.0,<4.0a0|>=3.29.0,<4.0a0']
Package requests conflicts for:
gym -> requests[version='>=2.0']
Package pyglet conflicts for:
gym -> pyglet[version='>=1.2.0']
Package tk conflicts for:
python=3.6 -> tk[version='8.6.*|>=8.6.7,<8.7.0a0|>=8.6.8,<8.7.0a0']
Package openssl conflicts for:
python=3.6 -> openssl[version='1.0.*|1.0.*,>=1.0.2l,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1c,<1.1.2a']
Package zlib conflicts for:
python=3.6 -> zlib[version='>=1.2.11,<1.3.0a0']
Package ncurses conflicts for:
python=3.6 -> ncurses[version='6.0.*|>=6.0,<7.0a0|>=6.1,<7.0a0']
Package numpy conflicts for:
gym -> numpy[version='>=1.10.4']
Package six conflicts for:
gym -> six
Package pip conflicts for:
python=3.6 -> pip
Package readline conflicts for:
python=3.6 -> readline[version='7.*|>=7.0,<8.0a0']
Package scipy conflicts for:
gym -> scipy

I am finding it difficult to interpret this error so am not sure where to go from here to try and fix it.我发现很难解释这个错误,所以我不确定从这里到 go 去哪里尝试修复它。

I also tried installing the package at the same time as creating the environemt but there was the same issue.我还尝试在创建环境的同时安装 package,但存在同样的问题。

Python version - 3.6.9 conda version - 4.7.12 Python 版本 - 3.6.9 conda 版本 - 4.7.12

Hopefully someone can help me!希望有人可以帮助我!

The error means that the package has dependency requirements that conflict with one another.该错误意味着 package 具有相互冲突的依赖关系要求。 Given that you've tried to install this into a fresh environment with nothing else installed, this is something that the package maintainer needs to fix, and there is not much else you can do.鉴于您已尝试将其安装到未安装其他任何东西的新环境中,这是 package 维护人员需要修复的问题,您无能为力。

Alternatively, you can try pip install gym to install the package.或者,您可以尝试pip install gym来安装 package。 Check out their README on GitHub for more information.查看GitHub 上的自述文件以获取更多信息。 In case you're not aware, you can use Pip in a conda environment .如果您不知道,您可以在 conda 环境中使用 Pip

While the hcc channel hosts the gym package, it has a requirement of pyglet which is not available on hcc or defaults .虽然hcc频道托管了gym package,但它需要pyglet ,这在hccdefaults上不可用。 Try also including the conda-forge channel as well:也尝试包括conda-forge频道:

conda create -n gym_env -c hcc -c conda-forge python=3.6 gym

Note, that when creating an env for a specialized purpose, it is generally recommended to include the key packages at creation.请注意,在为特定目的创建环境时,通常建议在创建时包含关键包。

https://anaconda.org/conda-forge/gym https://anaconda.org/conda-forge/gym

conda install -c conda-forge gym conda install -c conda-forge 健身房

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM