user3741230
user3741230

Reputation: 307

Pandas Seaborn Install

On Ubuntu 12.04 LTS running Python 2.7 I'm getting an install error from attempting to add the great looking Seaborn plotting package to my existing Pandas environment which is running fine.

Here's a snippet from the console containing the errors:

~$ pip install seaborn
running install_lib

creating /usr/local/lib/python2.7/dist-packages/seaborn

error: could not create '/usr/local/lib/python2.7/dist-packages/seaborn': 
Permission denied

Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tm/pip_build_moj0/seaborn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LvVao5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_mojo/seaborn
Storing debug log for failure in /home/mojo/.pip/pip.log

Anyone have a resolution tip not available on the Seaborn github site?

Upvotes: 12

Views: 35813

Answers (2)

Emre
Emre

Reputation: 6227

Personal installation is a good habit to get into:

pip install --user seaborn

However, there is an even easier way: as of writing python XY maintains up-to-date builds of pandas and seaborn (among other useful packages), so all you have to do is

sudo add-apt-repository ppa:pythonxy/pythonxy-devel
sudo apt-get update
sudo apt-get install python-seaborn python-pandas

Note that this will only work with python 2.x; you will still need pip3 to install the python 3.x packages.

Upvotes: 7

Andy Hayden
Andy Hayden

Reputation: 375695

I think the easiest way is to use sudo:

sudo pip install seaborn

It requires sudo permission to write to usr/local/lib.

Note: If you're using anaconda you won't need sudo to install via pip, once you've conda installed pip, though seaborn may also be available via conda.

Upvotes: 8

Related Questions