Python Forum

Full Version: Pandas installation error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use VS Code, with Anaconda installer on Mac. So I tried using pandas package for the first time and I wasn't sure if I had the package or not. I ran the simple code to check if i had it installed
import pandas as pd
And the error comes
Error:
line 1, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas'
It also shows in the problems section
Error:
Unable to import 'pandas' pylint(import-error)
What can I do to install pandas?
you need to install pandas
pip install pandas from command line
It shows
pip install pandas
Requirement already satisfied: pandas in ./opt/anaconda3/lib/python3.7/site-packages (1.0.1)
Requirement already satisfied: pytz>=2017.2 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (2019.3)
Requirement already satisfied: numpy>=1.13.3 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (1.18.1)
Requirement already satisfied: python-dateutil>=2.6.1 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in ./opt/anaconda3/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.14.0)
Well I figured it out - had ran it in the wrong place.
Thanks Larz60+