Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 595
user3741230 Avatar asked Jun 14 '14 21:06

user3741230


People also ask

What is command to install seaborn?

conda install seaborn -c conda-forge.

Is seaborn a python package?

Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics.


2 Answers

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.

like image 191
Emre Avatar answered Oct 23 '22 12:10

Emre


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.

like image 25
Andy Hayden Avatar answered Oct 23 '22 12:10

Andy Hayden