Packages not avaible in Pycharm

I use external packages as networkx, pyplot, gurobi and it works fine in a console, but i can not get it to work in Pycharm. I have tried to setup patches under "Python Interpreters", but without success. Any hint?
3 comments
Are you sure that you are using the same Python interpreter in PyCharm and in a console?

What are your Python paths? (Preferences | Project Interpreter| Python Interpreters | Paths).

Where these modules are located? Run from a console:

>>> import pyplot
>>> pyplot.__file__
prettyPrint();
0
Thanks Andrey. It is the same, but it seems that I have been running pycharm.sh with sudo the first time :( If i start pycharm from console ./pycharm.sh, it all works fine
0

I have the same problem with Gurobi.
Everything works well in terminal when I execute "python <file name.py>" but it pycharm I get this error:

/usr/bin/python /home/amir/PycharmProjects/test2/test2.py
Traceback (most recent call last):
  File "/home/amir/PycharmProjects/test2/test2.py", line 97, in <module>
    from gurobipy import *
  File "/usr/local/lib/python2.7/dist-packages/gurobipy/__init__.py", line 1, in <module>
    from .gurobipy import *
ImportError: libgurobi70.so: cannot open shared object file: No such file or directory

 

I checked all the python interpreter and settings in pycharm and everything is the same.

But there is an interesting issue!
when I run pycharm software from terminal by just typing "charm" and then load the file, everything works perfectly!

but when you just click on the pycharm icon, I get the same error again.

Please help :-)

0

Please sign in to leave a comment.