using gurobi in jupyer notebook
AnsweredHello,
I have both jupyer notebook and gurobi installed in my machine. After that, I have run the following two lines of command in Anaconda Prompt
conda config --
add channels http://conda.anaconda.org/gurobi
conda install gurobi
However, I am still seeing error messages in my Jupyter notebook - No module named 'gurobipy'
However when I run "conda list" in my Anaconda Prompt, I can see gurobipy installed.
Please help me to solve this issue.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Joyjit,
this means that the environment that the Jupyter notebook sees does not have gurobi. Typically there are three reasons for this:
a) You have created a separate environment (other than base). If you install gurobi there, you need to select that environment also in the Jupyter notebook. To do this, you need to have the package "nb_conda" installed and restart Jupyter notebook.
b) You have installed gurobi while the notebook is open. Then you should restart and it should be available then.
c) You have separate Python installations (most commonly 2.7 and 3.x), and gurobi gets installed into the wrong one. Then you should check your path variable.
Hope this helps, please let me know.
Best
Richard
0
Post is closed for comments.
Comments
2 comments