Cannot import pandas into pycharm interpreter despite changing pyCharm python interpreter path

I try to import pandas into the pyCharm python interpreter, but I keep getting scary

>>> import pandas Traceback (most recent call last): File "<input>", line 1, in <module> File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) ImportError: No module named pandas 

It works fine when I run python from terminal. I got acquainted with the solutions for this, but so far no one has worked. I deleted the command, reinstalled and updated pandas. I changed the python interpreter of the pyCharm project and the python default interpreter pyCharm to be "2.7.5 (/ usr / local / bin / python)", so now:

 >>> os.system('which python') /usr/local/bin/python 

found in the pycharm interpreter and python terminal interpreter.

Any other ideas on how to fix this?

thanks

+5
source share
2 answers

It turns off by changing the shell path in the pyCharms settings (in the menu bar pyCharm → Settings → tools → terminal → Shell Path):

 > echo $PATH # whatever this spits out in terminal is your shell path 

fixed everything :)

+5
source

I changed the project interpreter in PyCharm -> Preferences -> Project -> Project Interpreter to the one used by my system. I had 2.6 and 2.7 on the system, and PyCharm used 2.6 by default. Changed it to 2.7, which is what Terminal used. The problem is solved.

+3
source

Source: https://habr.com/ru/post/1213845/


All Articles