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?
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__
Thanks Andrey. It is the same, but it seems that I have been running with sudo the first time :( If i start pycharm from console ./, it all works fine

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

/usr/bin/python /home/amir/PycharmProjects/test2/
Traceback (most recent call last):
  File "/home/amir/PycharmProjects/test2/", line 97, in <module>
    from gurobipy import *
  File "/usr/local/lib/python2.7/dist-packages/gurobipy/", line 1, in <module>
    from .gurobipy import *
ImportError: 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 :-)


Please sign in to leave a comment.