Can't import gurobi.py to Spyder IDE

990 views
Skip to first unread message

bjorn.1.s...@ltu.se

unread,
Nov 10, 2015, 4:43:25 PM11/10/15
to Gurobi Optimization
I have just installed Gurobi 6.5 on my new MacBook Pro with OS10.10.5 and having problem with using Anaconda Spyder. When trying to run a gurobi problem from Spyder I get the error message that: 'from gurobipy import*' used; unable to detect undefined names. The channel is added and Gurobi-package is installed, but it does not work. If I run the problem in python (Anaconda) from terminal it works as it should. 

Does anyone has a clue why it does not work from Spyder IDE?

Thanks,
Björn

Kostja Siefen

unread,
Nov 16, 2015, 7:39:31 AM11/16/15
to Gurobi Optimization
Hi Björn,

can you double check that you run Spyder from the same python environment where you installed Gurobi?

Best wishes,
Kostja

bjorn.1.s...@ltu.se

unread,
Nov 19, 2015, 3:23:07 AM11/19/15
to Gurobi Optimization
Hi, as far as I can see in the console window in Spyder it is the Anaconda python, the same version as when I call python from the terminal. And from the terminal I can run all my models.

//Björn

Bob Haffner

unread,
Nov 30, 2015, 1:58:41 PM11/30/15
to Gurobi Optimization
I've heard that Spyder does not like Import * 

Is it a warning or an error?  To ask it another way, can you still run your code?
Reply all
Reply to author
Forward
0 new messages