I'm trying to import pandas in the pyCharm python interpreter, but I keep on getting the dreaded
>>> 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 the terminal. I've read up on solutions for this, but none have worked so far. I've pip uninstalled, reinstalled, and updated pandas. I've changed the pyCharm project python interpreter and default pyCharm python interpreter to be "2.7.5 (/usr/local/bin/python)", so that now:
>>> os.system('which python')
/usr/local/bin/python
occurs in the pycharm interpreter and terminal python interpreter.
Any more ideas on how to fix this?
Thanks
Turns out, changing my terminal shell path in pyCharms settings (In the menu bar, pyCharm --> Preferences --> tools --> terminal --> Shell Path) to the correct thing:
> echo $PATH # whatever this spits out in terminal is your shell path
fixed everything :)
I changed the project interpreter under PyCharm -> Preferences -> Project -> Project Interpreter to the one that that of my system uses. I had 2.6 and 2.7 in the system and PyCharm was using 2.6 by default. Changed it to 2.7 which is what the Terminal was using. Problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With