i use mac terminal to check my package:
pip list
i can find all packages include pandas
but
Sometimes, it might be due to an issue with "Microsoft visual C++".
pip install pandas
to install pandaspip
is not installed, then download thr pandas source package with extension tar.gz
and place it in directory wherever you want after extracting. open cmd.exe
and navigate to the path where pandas folder is extracted & placed using cd C:/pandas
. Then install it using the python setup.py install
Finally you should get the success message as Finished processing dependencies for pandas==0.xx.0
Try to install pandas using pip and pip3.
pip install pandas
pip3 install pandas
A suggestion, use pyenv and set a python version for your local directory.
If python v2.7 is already installed, then to install numpy and pandas for v2.7. Run the below commands :
for Ubuntu / Linux -
sudo apt-get install python-numpy
sudo apt-get install python-pandas
If python v3 is already installed, then to install numpy and pandas for v3. Run the below commands :
for Ubuntu / Linux -
sudo apt-get install python3-numpy
sudo apt-get install python3-pandas
First of all, install virtualenv
inside your project folder to secure your project directory to avoid conflict with your other packages.
pip install virtualenv
After installing this run this command one by one inside your root project directory:
virtualenv venv
source venv/bin/activate
Now Your directory is secure and you can install your required packages inside.
pip install pandas
and others as you required.
Because you have installed virtualenv
and running as secure it will not conflict with other outside packages.
Use this all steps one by one. I hope it will work for you to avoid such error.
Thanks.
I had Python2
and Python3
installed in different directories but I was facing this error because whenI was using the command pip install pandas
it was installing pandas in Python2
directories while I was using Python3
So I had two diectories with Python2 --> C:\Python27
and Python365 --> C:\Python365
.
To resolve this error:
Run pip install pandas
in cmd
. If library pandas
is already installed you'll see something like following.
C:\Users\vichitrak>pip install pandas
Requirement already satisfied: pandas in c:\python27\lib\site-packages (0.23.4)
Requirement already satisfied: python-dateutil>=2.5.0 in c:\python27\lib\site-packages (from pandas) (2.7.3)
Requirement already satisfied: numpy>=1.9.0 in c:\python27\lib\site-packages (from pandas) (1.14.4)
Requirement already satisfied: pytz>=2011k in c:\python27\lib\site-packages (from pandas) (2018.4)
Requirement already satisfied: six>=1.5 in c:\python27\lib\site-packages (from python-dateutil>=2.5.0->pandas) (1.11.0)
From the output of above command you can see that pandas
is installed in Python2
directory i.e. c:\python27\lib\site-packages (0.23.4)
Run python
command in cmd
to check which Python
version are you running.
C:\Users\vichitrak>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
You can see that I'm using Python3
while pandas
is installed in Python2
directory`
To install the pandas
and other libraries in Python3
go to scripts folder
in Python3 directory i.e. C:\Python365\Scripts
Open Command Window
and run pip install pandas
Or you can use the complete path of pip in Python3 directory
on cmd
to run the intsall
command i.e. C:\Users\vichitrak>C:\Python365\Scripts\pip install pandas