月別アーカイブ: 2023年11月

pygameモジュールをインストールしようとしたらエラーメッセージfailed with initial frozen solve. Retrying with flexible solve.

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.

という説明がありました。pygameはpython3.7には対応していないようです。

Anaconda NavigatorでCreateで新しい環境Environmentを作ることにします。ここでpyton3.5を指定。この環境にpython35と名付けておきます。で、jupyterをインストールするところから。結構時間がかかりますね。

で、jupyterノートブック上で、

!conda install -c cogsci pygame

を実行してみます。

うまくいきませんでした。状況はむしろ悪化して、普通にjupyterをつかうことすらできなくなりました。カーネルエラーというのになります。こまった。。

あれこれためして(Environmentsで使っていないものを削除したり)、base(root), Anaconda3, python35の3つの環境にまで減らしておいてpython35でjupyterノートブックを開き、そのノート上で、

!pip install -U pygame –user

としてRUNしました。すると、

  Downloading pygame-2.5.2-cp37-cp37m-win_amd64.whl (10.7 MB)
Installing collected packages: pygame
Successfully installed pygame-2.5.2

ぶじ終了のメッセージがでました。さっきと何が違ったのかわかりませんが。