簡體   English   中英

無法使用 conda 安裝 Pygame

[英]Can't install Pygame using conda

我正在嘗試使用 conda 安裝 Pygame 模塊。

我使用了這個命令:

conda install pygame

它給了我以下錯誤:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - pygame

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

然后我使用了以下命令:

conda install -c cogsci pygame

Output:

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.
Examining python=3.7: 100%|██████████████████████████████████████████████████████████████| 2/2     [00:00<00:00, 11.12it/s]-failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - pygame -> python[version='2.7.*|3.5.*']

Your python: python=3.7

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.

我使用 conda install 安裝了不同的模塊,如 tensorflow、numpy、pandas、matplotlib,它們都在工作,但它在 pygame 中給我一個錯誤。如何修復它並安裝 Pygame?

cogsci 的 pygame package cogsci 4 年歷史,僅兼容 python2.7。 如果你想要最新版本,請使用pip install pygame 我個人使用 evindunn 的evindunn ,它僅適用於 linux-64

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM