rioualen rioualen - 1 month ago 6
Python Question

Issues with pandas install - running several versions of python

I'm having issues with installing the panda library. I'm currently using snakemake with Python version 2.7 and 3.4 under LMDE.
I've tried the following:

pip install pandas


which doesn't work, as I get the following error:

No module named 'pandas'


I figured it is because snakemake is based on python 3, and I tried solutions from this post.
This one not working (I don't quite get the concept of virtualenv anyway):

apt-get install python-virtualenv virtualenvwrapper
mkvirtualenv -p python3 pandas_env
pip install pandas


Then I tried:

sudo apt-get install python3-pandas


It worked fine but then I got this error:

parser_f() got an unexpected keyword argument 'skip_blank_lines'


From this post it looks like a version problem, which should be > 0.15. Last command said it installed pandas 0.14, but when I checked here's what I got:

>>> import pandas as pd
>>> pd.__version__
'0.16.2'


I'm getting stuck here, between python versions and pandas versions I don't know what to do. Any help would be greatly appreciated.

Answer

OK so it seems it makes a difference to install a python lib with pip whether I use sudo as myself or as root?...

I had done

$ sudo pip install pandas

Now I did

$ sudo pip uninstall pandas
$ su -
# pip install pandas

And now it seems to work perfectly fine! Is this normal though?