Can't import pandas into pycharm interpreter, despite changing pyCharm python interpreter path
Solution 1
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 :)
Solution 2
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.
![Hillary Sanders](https://i.stack.imgur.com/4Imv8.jpg?s=256&g=1)
Hillary Sanders
me: Data = fun, I like to visualize and play with it. Statistics is the answer to wanting to optimally evaluate evidence and new information about the world. I enjoy making art (hillarysanders.com/mixed-media.html). I like trees. I enjoy playing Dominion and poker. I listen to audiobooks. I like Arrested Development, It's Always Sunny, Game of Thrones, and 30 Rock. I really enjoy bouldering. hillarysanders.com https://www.linkedin.com/in/hillarysanders
Updated on June 16, 2022Comments
-
Hillary Sanders about 2 years
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