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?
1 Answer
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
--useroption 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__) 3 Comments
sudo pip install -U pandas this is what happens < pastee.org/xm2mn > .
pip install --upgrade pandas.Downloading pandas-0.18.1.tar.gz (7.3MB):then it donloadsDownloading numpy-1.11.1.zip (4.7MB):and then the warning as in question. and ultimately teminates onUnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal not in range(128)no such option: --no-cache-dir