Gym: Can't instal Box2d on Windows

Created on 5 Jun 2019  路  5Comments  路  Source: openai/gym

I have the following error thrown when installing box2d. Can someone point me in the right direction?

E:\Anaconda3\envs\gym\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IE:\Anaconda3\envs\gym\include -IE:\Anaconda3\envs\gym\include -c Box2D\Box2D_wrap.cpp -o build\temp.win-amd64-3.5\Release\box2d\box2d_wrap.o -I.

Box2D\Box2D_wrap.cpp: In function 'bool b2CheckVertices(b2Vec2*, int32, bool)': Box2D\Box2D_wrap.cpp:3760:16: warning: variable 'm_centroid' set but not used [-Wunused-but-set-variable] b2Vec2 m_centroid = __b2ComputeCentroid(vertices, count);

Box2D\Box2D_wrap.cpp: In function 'long int b2ContactPoint___hash__(b2ContactPoint)': Box2D\Box2D_wrap.cpp:4181:77: error: cast from 'b2ContactPoint' to 'long int' loses precision [-fpermissive] SWIGINTERN long b2ContactPoint___hash__(b2ContactPoint *self){ return (long)self; }

Box2D\Box2D_wrap.cpp: In function 'long int b2AssertException___hash__(b2AssertException)': Box2D\Box2D_wrap.cpp:4205:83: error: cast from 'b2AssertException' to 'long int' loses precision [-fpermissive] SWIGINTERN long b2AssertException___hash__(b2AssertException *self){ return (long)self; }

......

Box2D\Box2D_wrap.cpp: In function 'long int b2WheelJoint___hash__(b2WheelJoint)': Box2D\Box2D_wrap.cpp:5250:73: error: cast from 'b2WheelJoint' to 'long int' loses precision [-fpermissive] SWIGINTERN long b2WheelJoint___hash__(b2WheelJoint *self){ return (long)self; }

error: command 'E:\Anaconda3\envs\gym\Library\mingw-w64\bin\gcc.exe' failed with exit status 1

Most helpful comment

I have not installed python explicitly on Windows, I just have python in Anaconda so pip doesn't work on CMD.
Though I have found the solution to my problem. Here is the link https://www.bountysource.com/issues/62570996-pybox2d-fail-to-build-with-mingw-on-windows
Just removing the lines worked for me.

All 5 comments

Is this what you tried pip install box2d-py ?
Run CMD as admin when installing pip packages

I am using Conda Prompt for installing this on my user's anaconda environment. I don't think why running it as an admin would solve the problem

Did you try pip from CMD ?

I have not installed python explicitly on Windows, I just have python in Anaconda so pip doesn't work on CMD.
Though I have found the solution to my problem. Here is the link https://www.bountysource.com/issues/62570996-pybox2d-fail-to-build-with-mingw-on-windows
Just removing the lines worked for me.

@yashkhem1
Removing which lines? The link doesn't seem to have a solution

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lbbc1117 picture lbbc1117  路  3Comments

tornadomeet picture tornadomeet  路  4Comments

RuofanKong picture RuofanKong  路  4Comments

Baichenjia picture Baichenjia  路  3Comments

cpatyn picture cpatyn  路  4Comments