No module named 'pandas' issue, using Jupyter Notebook on Mac OS X

Viewed 1450

I am trying to import pandas to use in a Jupyter Notebook that I locally installed using Homebrew on my MacBook Pro. I installed pandas using pip, which I downloaded and installed using python3 get-pip.py. I have made sure that pip, python3 and python are all in the PATH, as well as Jupyter. Also, in the same script as I am trying to import pandas, I do a pip install of pandas, and it tells me I already have it, and the next line it tells me I do not? Attached is a screenshot of the notebook, any help is greatly appreciated. I really need to be able to use pandas for the project I am working on. Thank you.pandas module not found

    !pip install pandas
    import pandas as pd

Requirement already satisfied: pandas in /usr/local/lib/python3.8/site-packages (1.1.1)
Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.8/site-packages (from pandas) (2020.1)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/site-packages (from pandas) (2.8.1)
Requirement already satisfied: numpy>=1.15.4 in /usr/local/lib/python3.8/site-packages (from pandas) (1.19.1)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-6b7405621ef2> in <module>
      1 get_ipython().system('pip install pandas')
----> 2 import pandas as pd

ModuleNotFoundError: No module named 'pandas'

    import sys; print(sys.path)

    import pandas as pd

['/Users/wbiscan/Documents', '/usr/local/Cellar/jupyterlab/2.2.5/libexec/lib/python38.zip', '/usr/local/Cellar/jupyterlab/2.2.5/libexec/lib/python3.8', '/usr/local/Cellar/jupyterlab/2.2.5/libexec/lib/python3.8/lib-dynload', '/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8', '', '/usr/local/Cellar/jupyterlab/2.2.5/libexec/lib/python3.8/site-packages', '/usr/local/Cellar/jupyterlab/2.2.5/libexec/lib/python3.8/site-packages/IPython/extensions', '/Users/wbiscan/.ipython']
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-8cf22b110223> in <module>
      2 
      3 
----> 4 import pandas as pd

ModuleNotFoundError: No module named 'pandas'
0 Answers
Related