0.環境
・Windows10
・anaconda3.7
1.PATHの設定
後のためにPAHを通しておくと、pipだけで起動できる。(pythonを実行してpipでも可能と思われるが)
PATHはコマンドプロンプトから下記のようにして確認できる。
C:\Users*>where python
C:\Users*\Anaconda3\python.exe
C:\Users**\AppData\Local\Microsoft\WindowsApps\python.exe
2.インストール
2-1.Visual Studio c++が入っている場合
以下のとおり、pip installでインストール可能。
C:\Users*>pip install pybullet
Collecting pybullet
Using cached https://files.pythonhosted.org/packages/25/98/9478dce17f53b8129165d0ee1f569a628340cf2d337ddb7b35d5014490b1/pybullet-2.6.4.tar.gz
Requirement already satisfied: numpy in c:\users\nori\anaconda3\lib\site-packages (from pybullet) (1.16.5)
Building wheels for collected packages: pybullet
Building wheel for pybullet (setup.py) ... done
Created wheel for pybullet: filename=pybullet-2.6.4-cp37-cp37m-win_amd64.whl size=72376304 sha256=144663282be94c1ed770335125cc17a61a26a82cfe7bab06108e70d8bdad037f
Stored in directory: C:\Users*\AppData\Local\pip\Cache\wheels\93\91\e5\ab781518019d07e6bbbd0fadf55ddf270bb971430b669bfa55
Successfully built pybullet
Installing collected packages: pybullet
Successfully installed pybullet-2.6.4
2-2.Visual Studio c++が入っていない場合
上記を実行すると、Visual C++ 14.0 が必要というエラーが出る。
Build Tools for Visual Studio 2019をダウンロードしてきて、V14をインストールすること。
※Build Tools for Visual Studioを起動してエラーが出たので、(念のため)Visual Studio Codeも入れてからインストール実行したら、Build Toolもインストールできた。Visual Studio Codeが必要なのかは不明だが。