olgabot / prettyplotlib

Painlessly create beautiful matplotlib plots.
olgabot.github.io/prettyplotlib
MIT License
1.69k stars 148 forks source link

Installation with pip (and easy_install) fails #62

Closed bnsblue closed 10 years ago

bnsblue commented 10 years ago

This is what I got from the installation through pip (and easy_install):

g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/src/ft2font.o build/temp.linux-x86_64-2.7/src/mplutils.o build/temp.linux-x86_64-2.7/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.7/CXX/cxx_extensions.o build/temp.linux-x86_64-2.7/CXX/cxxsupport.o build/temp.linux-x86_64-2.7/CXX/cxxextensions.o -L/usr/local/lib -lfreetype -lstdc++ -lm -o build/lib.linux-x86_64-2.7/matplotlib/ft2font.so

building 'matplotlib._png' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC ->DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o

src/_png.cpp:10:20: fatal error: png.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

Rolling back uninstall of matplotlib Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_root/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-U3hamL-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/matplotlib Storing debug log for failure in /home/hsuch/.pip/pip.log

I tried to look for png.h, and it looks like it is indeed missing in the downloaded tarball

jgosmann commented 10 years ago

Dou you have Matplotlib installed? The error above seems to be an error of installing matplotlib. Actually, I think I saw this error before, but I cannot remember how to solve it right now. :(

If you do not have matplotlib installed, you might want to try to install it first with your distribution's package manager.

bnsblue commented 10 years ago

Hi, thank you for your fast reply!I have matplotlib and the other prerequisite installed on my Ubuntu already, and it was installed via apt-get. I am actually able to use matplotlib to generate (not-so-pretty) graphs...Any suggestions?:)Thank you!Sent from AcompliOn Thu, May 22, 2014 at 8:44 AM -0700, "Jan Gosmann" notifications@github.com wrote:

Dou you have Matplotlib installed? The error above seems to be an error of installing matplotlib. Actually, I think I saw this error before, but I cannot remember how to solve it right now. :(

If you do not have matplotlib installed, you might want to try to install it first with your distribution's package manager.

—Reply to this email directly or view it on GitHub.

olgabot commented 10 years ago

Thank you for your comment. Unfortunately, I no longer have the bandwidth to maintain prettyplotlib. I recommend using seaborn. Using seaborn, to get the prettyplotlib style, do:

import seaborn as sns
sns.set(style='ticks', palette='Set2')

And to remove "chartjunk", do:

sns.despine()

If you have discrete pull requests, I will accept them, but I personally will no longer fix bugs.

If you are a biological scientist looking for ways to analyze your big-ish (20+ samples) data, check out my main project, flotilla.