Error: Importing Gurobi in Python/Spyder

lars111 picture lars111 · Apr 12, 2016 · Viewed 11.5k times · Source

I installed Gurobi: 6.5.1 64bit and Anaconda - Spyder 2.3.8; Python 2.7.11 64bit

When I try to import Gurobi:

from gurobipy import *

I get the error message: "No module named gurobipy"

It is also not possible to install it via pip.

Can anybody help me?

Thank you very much!

Answer

Sam picture Sam · Apr 12, 2016

cd to the folder where your gurobi program is held at the command line:

 cd gurobi460\win64

Then run the setup script at the command line:

python setup.py install