Python can't install Box2D swig.exe failed with error code 1

I got the same error for Box2D, but solved as follows.

I am using Anaconda environment with python3.6.

try these.

conda install swig

pip install box2d


download swig here : http://www.swig.org/download.html

Extract the archive somewhere, add the path of the extracted directory to your PATH environment variable.

Restart your cmd console window (close it and reopen it), do your pip install Box2D

I need to say that when on the anaconda environment, just add path, it also doesn't work. we need to go on the Scripts with pip.exe. And run the command!


I got same error for Box2D.
My Solution- downloading Microsoft Visual C++ Compiler for Python 2.7 from http://aka.ms/vcpython27 Complete the installation.
Then on anaconda prompt type command 'pip install Box2D'
Then type 'pip install gym[all]'
This will install the remaining dependencies.

Hope this helps you.