New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation issue #6344
Comments
The final error is most likely due to not having the python3 development As for the other errors, it depends on how you obtained the source. Was it On Thu, Apr 28, 2016 at 10:26 AM, yiyangshi notifications@github.com
|
The next-to-last error is just saying that you need to install nose for the test. |
Tried to install the project on Linux system with Python 2.7.
According to the instruction, I first did: sudo apt-get install python-matplotlib
And tried to test it:
$ python
Then I got error:
ERROR: Failure: IOError (The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 400, in loadTestsFromName
module = resolve_name(addr.module)
File "/usr/lib/python2.7/dist-packages/nose/util.py", line 311, in resolve_name
module = import('.'.join(parts_copy))
File "/usr/lib/pymodules/python2.7/matplotlib/tests/init.py", line 17, in
'The baseline image directory does not exist. '
IOError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.
So I tried to install from source following the instruction in INSTALL file. I downloaded the source from https://pypi.python.org/pypi/matplotlib/
And did:
$ cd matplotlib-1.5.1
$ python setup.py build
$ sudo python setup.py install
All the commanded succeeded. But when I run matplotlib.test() again. I got the new error:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.5.1-py2.7-linux-x86_64.egg/matplotlib/init.py", line 1504, in test
verify_test_dependencies()
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.5.1-py2.7-linux-x86_64.egg/matplotlib/init.py", line 1496, in verify_test_dependencies
import mock
I also tried to install on Python 3:
$ sudo apt-get install python3-matplotlib
ERROR: Failure: OSError (The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/usr/lib/python3/dist-packages/nose/loader.py", line 400, in loadTestsFromName
module = resolve_name(addr.module)
File "/usr/lib/python3/dist-packages/nose/util.py", line 311, in resolve_name
module = import('.'.join(parts_copy))
File "/usr/lib/python3/dist-packages/matplotlib/tests/init.py", line 17, in
'The baseline image directory does not exist. '
OSError: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.
So again I tried to install from source.
$ python3 setup.py build
but I got this error:
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.5.1]
python: yes [3.4.3 (default, Oct 14 2015, 20:28:29) [GCC
4.8.4]]
platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.2]
dateutil: yes [using dateutil version 2.0]
pytz: yes [using pytz version 2012c]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [using tornado version 3.1.1]
pyparsing: yes [using pyparsing version 2.0.1]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 2.5.2]
png: yes [version 1.2.50]
qhull: yes [Using system Qhull (version unknown, no pkg-
config info)]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.3.1 / using unittest.mock]
toolkits_tests: yes [using nose version 1.3.1 / using unittest.mock]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: yes [installing, version 3.8.10]
gtk3cairo: yes [installing, version 3.8.10]
gtkagg: no [Requires pygtk]
tkagg: yes [installing, version not identified]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: yes [installing, pycairo version 1.10.0]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: yes [version 9.10]
latex: no
pdftops: yes [version 0.24.5]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'namespace_packages'
warnings.warn(msg)
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-3.4/matplotlib/mpl-data
UPDATING build/lib.linux-x86_64-3.4/matplotlib/_version.py
set build/lib.linux-x86_64-3.4/matplotlib/_version.py to '1.5.1'
running build_ext
building 'matplotlib.ft2font' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python3.4m -c src/ft2font.cpp -o build/temp.linux-x86_64-3.4/src/ft2font.o
In file included from src/ft2font.cpp:9:0:
src/mplutils.h:21:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: