Re: [Gurobi] Using Gurobi 8.1.0 in PyCharm

180 views
Skip to first unread message

BODJRE HUGUES

unread,
Dec 31, 2018, 7:19:44 PM12/31/18
to gur...@googlegroups.com
I'm the same problem
**************************
BODJRE Aka Hugues ------------------------------------------------------------------------------
***VANITÉ DES VANITÉS TOUT EST VANITÉ IL N'Y A RIEN DE NOUVEAU SOUS LE SOLEIL***
TEL: (+225) 08 80 36 46
 


Garanti sans virus. www.avast.com

Le jeu. 27 déc. 2018 à 12:30, Kristina <swantj...@gmail.com> a écrit :
Hello everyone:)

I need Gurobi for some optimization problems and downloaded version 8.1.0 and installed the package in my terminal (I am using  Mac). In the terminal Gurobi seems to work. I would like to use it within Pycharm though.
My first command  "from gurobipy import *" leads to the follwoing error:

ModuleNotFoundError: No module named 'gurobipy'

In Jupyter Notebook the code works fine...

Can anyone help me with this?

Thank you in advance and kind regards
Kristina

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Luce

unread,
Jan 6, 2019, 11:46:48 PM1/6/19
to Gurobi Optimization
Hi,

in a typical workflow each PyCharm project will have a virtual environment associated with it.  The gurobipy package must be available to the python interpreter of that venv.  The simplest way is to

1) Go to a terminal window *from within PyCharm* (butten bottom left)
2) Follow the installation instructions at the end of


For example, I did:

(venv) bash-3.2$ which python
/Users/luce/PycharmProjects/TestProject/venv/bin/python
(venv) bash-3.2$ cd /Library/gurobi810/mac64/
(venv) bash-3.2$ python setup.py install

Hope this helps!

Robert

Mónica Albornoz

unread,
Jan 26, 2019, 3:30:08 PM1/26/19
to Gurobi Optimization
Hello, 

Thanks to your post I finally got what was the problem that didn't let me use Gurobi on PyCharm, but I don't get what you meant by:
 
1) Go to a terminal window *from within PyCharm* (butten bottom left)

Could you please clarify? 

Thanks!

Robert Luce

unread,
Jan 29, 2019, 3:29:55 AM1/29/19
to Gurobi Optimization

1) Go to a terminal window *from within PyCharm* (butten bottom left)

Could you please clarify?

See attached screenshot, Robert.


Screen Shot 2019-01-29 at 09.25.25.png
Reply all
Reply to author
Forward
0 new messages