So, Currently I have Python 2.7.6
in my linux system and pandas version '0.13.1'
so I was using dt accesor in my code which wasnt working.After some google I came to know it requires higher version of pandas. I tried a couple of things. It is giving me warning #warning "Using deprecated NumPy API, disable it by " \
. Any help on this how can I upgrade this?
-
1use `pip install --upgrade pandas`. – shivsn Jul 14 '16 at 11:18
-
@shivsn I did that only it first downloads `Downloading pandas-0.18.1.tar.gz (7.3MB): `then it donloads`Downloading numpy-1.11.1.zip (4.7MB):` and then the warning as in question. and ultimately teminates on `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal not in range(128)` – Jul 14 '16 at 11:31
-
@shivsn `no such option: --no-cache-dir` – Jul 14 '16 at 11:52
-
@shivsn already did that same problem – Jul 14 '16 at 12:04
-
take a look at [this](http://stackoverflow.com/questions/26473681/pip-install-numpy-throws-an-error-ascii-codec-cant-decode-byte-0xe2) question. – shivsn Jul 14 '16 at 12:05
-
for full process < https://pastee.org/3dxcw > – Jul 14 '16 at 12:21
-
@shivsn thanx for your effort but non of the option worked. – Jul 14 '16 at 12:21
-
If you find a solution post it. – shivsn Jul 14 '16 at 12:28
1 Answers
Looking at the log, the two interesting lines are
copying build/lib.linux-x86_64-2.7/pandas/_period.so -> /usr/local/lib/python2.7/dist-packages/pandas
error: could not delete '/usr/local/lib/python2.7/dist-packages/pandas/_period.so': Permission denied
The problem is obvious: You have a system version of pandas installed in /usr/lib/python2.7
, and an old versions of pandas installed in /usr/local/lib/python2.7/
. /usr/local/bin
is a system-wide directory, so you need superuser rights to write to it. However, your user does not have these rights.
There are a number of options to rectify the problem:
- Use a virtualenv or another way of installing panda in a local directory. In order to avoid confusion, it may be a good idea to remove the system-wide installations in
/usr/local/
and the one in/usr/lib
. - Call pip install with the
--user
option to install pandas for your current user. Again, it depends on your system setup, but it may be a good idea to remove the system-wide installations. - Update the system-wide pip installation. You'll need superuser rights (typically acquired by prefixing the command with
sudo
, as insudo pip install -U pandas
). It may be a good idea to remove the OS version. - Find a way to update the OS version (in
/usr/lib
). Again, remove all others.
To remove the installation in /usr/local/lib/python2.7/pandas/
, run sudo pip uninstall pandas
or remove the directory outright.
It depends on the linux distribution how you get rid of your operating system version. In most releases, something along the lines of sudo apt-get remove -y python-pandas
should work.
Everything before these messages is just warnings. The UnicodeDecodeError
is a red herring, since it only occurs after the installation has failed.
To find out which pandas version you are using, you can examine the Python path (print(sys.path)
) or more cleverly, simply run
import pandas as pd
print(pd.__file__)
-
I already tried `sudo pip install -U pandas` this is what happens < https://pastee.org/xm2mn > . – Jul 14 '16 at 13:35
-
-
@Danish If you tried something already, please do include (a link to) these logs in the question! It sucks to have to guess stuff and play ping pong. In a similar vein, feel free to be a little bit more precise about your system, For instance, what Linux distribution are you running? What CPU architecture? Unless your system's configuration is a state secret (and then you probably shouldn't post on stackoverflow in the first place), I fail to comprehend why one would not include as much information as possible in a question. Alright, I have updated my answer based on the new log. – phihag Jul 14 '16 at 15:13