Error while trying to add guropiby package to Pycharm project

1,531 views
Skip to first unread message

Vladimir Stozhkov

unread,
Mar 9, 2016, 3:55:00 PM3/9/16
to Gurobi Optimization
Hi everyone,

I have a mistake that sometimes appears for PyCharm projects as far as I know.
I am working on Mac OS X 10.11.3 (El Captain) and PyCharm 5.0.4.
I am using Users profile (with no administrative rights) but I also have an administrator profile and I use its password to install programs.

When I try to install package gurobipy via project tool window (the link https://www.jetbrains.com/pycharm/help/installing-uninstalling-and-upgrading-packages.html explains how to do it) I have the following error:
execution error: The directory 'Users/admin/Library/Caches/pip/http' or its parent directory is not owned by current user and the cache has been disabled.
Please, check the attached file "PyCharm gurobipy 1.png".

When I try to install it to user's site packages directory I have the following error:
Non-zero exit code.
Please, check the attached file "PyCharm gurobipy 2.png".

I am using the default Python distribution 2.7.10 that comes together with Mac OS X and located in the directory "/usr/bin/python2.7" (check the attached file "PyCharm gurobipy 3.png").

Besides, I reckon similar errors have occurred for other people when they tried to install other packages. For instance, see
http://stackoverflow.com/questions/32490546/python-pycharm-pbm-installing-lxml-cairosvg-directory-not-owned-by-curren

I would appreciate any suggestions how to make gurobipy work on my Mac.

Best,
Vladimir.
PyCharm gurobipy 1.png
PyCharm gurobipy 2.png
PyCharm gurobipy 3.png

Sonja Mars

unread,
Mar 10, 2016, 2:12:16 AM3/10/16
to gur...@googlegroups.com
Hi Vladimir,

For using Gurobi on Mac, you will have to install Gurobi first, following these instructions here:
http://www.gurobi.com/documentation/6.5/quickstart_mac/software_installation_guid.html

After you installed it that way, you will also find gurobipy in the "Project Interpreter" tab.

What PyCharm tries, is to install gurobipy using pip. This is not possible. This is why you get this error.

Best regards,
Sonja

-----------------------------------------------------------------
Dr. Sonja Mars
Gurobi Optimization

Vladimir Stozhkov

unread,
Mar 10, 2016, 2:58:04 PM3/10/16
to Gurobi Optimization
Thank you,
Sonja.

I'll try to do it this way.
It looks like I was confused by the process of installation of other packages into PyCharm.

Steve Hall

unread,
Apr 19, 2018, 1:31:14 PM4/19/18
to Gurobi Optimization
I already have pycharm installed and now need to add Gurobi for a course I am taking.  How can I add the gurobi package into an existing pycharm install?

SWH

unread,
Apr 19, 2018, 9:03:40 PM4/19/18
to gur...@googlegroups.com
I have reinstalled pycharm and can now add gurobipy under the project interpreter preference setting.  I get a prompt that it was successfully installed, but it never appears in the package list.  If I call the package, I get an error that there is no module called gurobipy.  I tried gurobi as the package name with the same issue.

--

---
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.

Reply all
Reply to author
Forward
0 new messages