synchronize Gurobi 7 to Pycharm

1,875 views
Skip to first unread message

arian....@gmail.com

unread,
Nov 10, 2016, 12:36:33 PM11/10/16
to Gurobi Optimization
Hello,

I utilize Pycharm 2016.2.3 Community Edition as IDE to use Python 3.5 in Windows 7 64 bit. I installed Anaconda, and with no problem I used the packages of Anaconda for my data analyzing. Then, I installed Gurobi 7 (latest academic version) for my optimization problem. However, after entering licence and done everything the instruction said in the site, Pycharm cannot read the gurobipy module and I faced this error written below (I used one of Gurobi example):

File "C:/gurobi701/win64/examples/python/callback.py", line 22, in <module>
    from gurobipy import *
ImportError: No module named 'gurobipy'


Could anyone please help me with this matter and what should I do to synchronize Pycharm to Gurobi. 

Thanks.

Sonja Mars

unread,
Nov 14, 2016, 4:46:30 AM11/14/16
to gur...@googlegroups.com
Hi,

It looks like the Python that PyCharm is using cannot find your Gurobi installation. Did you install the Gurobi Anaconda package?

In a Windows command prompt, you can use for example this here:

conda install -c gurobi gurobi=7.0.1

Best regards, 
Sonja Mars


----
Dr. Sonja Mars
Gurobi Optimization - Technical Support 

arian....@gmail.com

unread,
Nov 14, 2016, 11:24:26 AM11/14/16
to Gurobi Optimization
Dear Dr. Sonja Mars,

Thank you so much for your help. Now, I can work with Gurobi in Pycharm.

Best,
Ebrahim Arian

isegkz...@gmail.com

unread,
Feb 15, 2018, 1:01:54 PM2/15/18
to Gurobi Optimization
Hi, Mr Arian. I can not make the Gurobi work with the Pycharm. Could you please share me your experience about how to make it work? Thank you!

isegkz...@gmail.com

unread,
Feb 19, 2018, 12:32:48 AM2/19/18
to Gurobi Optimization
Thanks. Finally I figured it out, just following the guide from Gurobi for Windows (http://www.gurobi.com/documentation/7.5/quickstart_linux/the_gurobi_python_interfac.html) and resetting the project interpreter of the Pycharm. Please make sure that the Gurobi and the Python have the same bit, like 32 bit for both or 64 bit for both.Thank you again. 
Reply all
Reply to author
Forward
0 new messages