📝
PyOpenGLを上手くインストールできないときの対処法
背景
PyOpenGLをインストールしようとしたが、
「PyOpenGL ... .whl is not a supported wheel on this platform」
と表示され上手くできなかったので、メモ。
実行環境
- Windows 11
- Python 3.6
- Anaconda
試したこと(上手くいかなかった)
- 以下のコードを実行
-> win32.pyファイルにfreeglutを入れたが駄目だった。pip install PyOpenGL pip install PyOpenGL_accelerate
解決方法
-
Pythonのバージョン確認
python --version
-
下記リンクにあるPyOpenGLの"PyOpenGL"と"PyOpenGL_accelerate"をダウンロード。
※このとき、Pythonのバージョンと同じファイルをダウンロードする。
例)Python3.6 -> "cp36"のものを選ぶ -
.whlファイルのインストール
ダウンロード先のパスへ移動後、以下実行pip install ダウンロードしたファイル
参考資料
Discussion