-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
To make a very short question : does matplotlib install in virtual environment need special flag or something like that ?
Installation of matplotlib in virtual environment via pip is ok on the last version. I've try to install the 1.3.1 version in order to make work another pip install (visual-logging) that seems to have trouble with matplotlib :
(cv) IkedaLabs-Mac-Pro:gurucv joaquim$ pip install visual-logging
Collecting visual-logging
Downloading visual-logging-0.2.tar.gz
Complete output from command python setup.py egg_info:
/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/matplotlib/font_manager.py:280: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
'Matplotlib is building the font cache using fc-list. '
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-build-43wzghug/visual-logging/setup.py", line 2, in
from vlogging import version
File "/private/var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-build-43wzghug/visual-logging/vlogging/init.py", line 47, in
import pylab
File "/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/pylab.py", line 1, in
from matplotlib.pylab import *
File "/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/matplotlib/pylab.py", line 257, in
from matplotlib import cbook, mlab, pyplot as plt
File "/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/matplotlib/backends/init.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 19, in
from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-build-43wzghug/visual-logging/
that sound there is some problem with matplotlib.
so I've tried
pip install matplotlib==1.3.1 (inside a virtual environment)
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'matplotlib.ft2font' extension
creating build/temp.macosx-10.12-x86_64-3.6
creating build/temp.macosx-10.12-x86_64-3.6/src
creating build/temp.macosx-10.12-x86_64-3.6/CXX
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/ft2font.cpp -o build/temp.macosx-10.12-x86_64-3.6/src/ft2font.o
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:52:
./CXX/Python3/Objects.hxx:416:22: warning: 'Py::Null::accepts' hides overloaded virtual function [-Woverloaded-virtual]
virtual bool accepts( PyObject *pyob )
^
./CXX/Python3/Objects.hxx:239:22: note: hidden overloaded virtual function 'Py::Object::accepts' declared here: different qualifiers (const vs none)
virtual bool accepts( PyObject *pyob ) const
^
./CXX/Python3/Objects.hxx:1108:19: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
, offset( NULL )
~ ^~~~
0
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:186:
./CXX/Python3/ExtensionType.hxx:127:13: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete m_methods_table;
^
[]
./CXX/Python3/ExtensionType.hxx:119:28: note: allocated with 'new[]' here
: m_methods_table( new PyMethodDef[ METHOD_TABLE_SIZE_INCREMENT ] )
^
In file included from src/ft2font.cpp:7:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788:
/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by "
^
4 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/mplutils.cpp -o build/temp.macosx-10.12-x86_64-3.6/src/mplutils.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c CXX/cxx_extensions.cxx -o build/temp.macosx-10.12-x86_64-3.6/CXX/cxx_extensions.o
In file included from CXX/cxx_extensions.cxx:42:
In file included from CXX/Python3/cxx_extensions.cxx:37:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:52:
./CXX/Python3/Objects.hxx:416:22: warning: 'Py::Null::accepts' hides overloaded virtual function [-Woverloaded-virtual]
virtual bool accepts( PyObject *pyob )
^
./CXX/Python3/Objects.hxx:239:22: note: hidden overloaded virtual function 'Py::Object::accepts' declared here: different qualifiers (const vs none)
virtual bool accepts( PyObject *pyob ) const
^
./CXX/Python3/Objects.hxx:1108:19: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
, offset( NULL )
~ ^~~~
0
In file included from CXX/cxx_extensions.cxx:42:
In file included from CXX/Python3/cxx_extensions.cxx:37:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:186:
./CXX/Python3/ExtensionType.hxx:127:13: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete m_methods_table;
^
[]
./CXX/Python3/ExtensionType.hxx:119:28: note: allocated with 'new[]' here
: m_methods_table( new PyMethodDef[ METHOD_TABLE_SIZE_INCREMENT ] )
^
3 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c CXX/cxxsupport.cxx -o build/temp.macosx-10.12-x86_64-3.6/CXX/cxxsupport.o
In file included from CXX/cxxsupport.cxx:42:
In file included from CXX/Python3/cxxsupport.cxx:38:
In file included from ./CXX/Objects.hxx:42:
./CXX/Python3/Objects.hxx:416:22: warning: 'Py::Null::accepts' hides overloaded virtual function [-Woverloaded-virtual]
virtual bool accepts( PyObject *pyob )
^
./CXX/Python3/Objects.hxx:239:22: note: hidden overloaded virtual function 'Py::Object::accepts' declared here: different qualifiers (const vs none)
virtual bool accepts( PyObject *pyob ) const
^
./CXX/Python3/Objects.hxx:1108:19: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
, offset( NULL )
~ ^~~~
0
2 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c CXX/IndirectPythonInterface.cxx -o build/temp.macosx-10.12-x86_64-3.6/CXX/IndirectPythonInterface.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c CXX/cxxextensions.c -o build/temp.macosx-10.12-x86_64-3.6/CXX/cxxextensions.o
clang++ -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk build/temp.macosx-10.12-x86_64-3.6/src/ft2font.o build/temp.macosx-10.12-x86_64-3.6/src/mplutils.o build/temp.macosx-10.12-x86_64-3.6/CXX/cxx_extensions.o build/temp.macosx-10.12-x86_64-3.6/CXX/cxxsupport.o build/temp.macosx-10.12-x86_64-3.6/CXX/IndirectPythonInterface.o build/temp.macosx-10.12-x86_64-3.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11/lib -L/usr/local/Cellar/freetype/2.6.3/lib -lfreetype -lstdc++ -lm -o build/lib.macosx-10.12-x86_64-3.6/matplotlib/ft2font.cpython-36m-darwin.so
building 'matplotlib._png' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/X11/include -I. -I/usr/local/Cellar/libpng/1.6.21/include/libpng16 -I/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/_png.cpp -o build/temp.macosx-10.12-x86_64-3.6/src/_png.o
In file included from src/_png.cpp:27:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:52:
./CXX/Python3/Objects.hxx:416:22: warning: 'Py::Null::accepts' hides overloaded virtual function [-Woverloaded-virtual]
virtual bool accepts( PyObject *pyob )
^
./CXX/Python3/Objects.hxx:239:22: note: hidden overloaded virtual function 'Py::Object::accepts' declared here: different qualifiers (const vs none)
virtual bool accepts( PyObject *pyob ) const
^
./CXX/Python3/Objects.hxx:1108:19: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
, offset( NULL )
~ ^~~~
0
In file included from src/_png.cpp:27:
In file included from ./CXX/Extensions.hxx:42:
In file included from ./CXX/Python3/Extensions.hxx:186:
./CXX/Python3/ExtensionType.hxx:127:13: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete m_methods_table;
^
[]
./CXX/Python3/ExtensionType.hxx:119:28: note: allocated with 'new[]' here
: m_methods_table( new PyMethodDef[ METHOD_TABLE_SIZE_INCREMENT ] )
^
In file included from src/_png.cpp:28:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788:
/Users/joaquim/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by "
^
src/_png.cpp:147:15: error: use of undeclared identifier 'npy_PyFile_Dup'
if ((fp = npy_PyFile_Dup(py_file, (char *)"wb")))
^
src/_png.cpp:243:17: error: use of undeclared identifier 'npy_PyFile_DupClose'
if (npy_PyFile_DupClose(py_file, fp)) {
^
src/_png.cpp:264:13: error: use of undeclared identifier 'npy_PyFile_DupClose'
if (npy_PyFile_DupClose(py_file, fp)) {
^
src/_png.cpp:329:15: error: use of undeclared identifier 'npy_PyFile_Dup'
if ((fp = npy_PyFile_Dup(py_file, "rb")))
^
src/_png.cpp:577:13: error: use of undeclared identifier 'npy_PyFile_DupClose'
if (npy_PyFile_DupClose(py_file, fp)) {
^
4 warnings and 5 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Rolling back uninstall of matplotlib
Command "/Users/joaquim/.virtualenvs/cv/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-build-dduoy35f/matplotlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-_zeo2yru-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/joaquim/.virtualenvs/cv/bin/../include/site/python3.6/matplotlib" failed with error code 1 in /private/var/folders/zv/7hjfdkkj55xcpbk40yc6k4kr0000gp/T/pip-build-dduoy35f/matplotlib/
Bug report
strangely the installation of matplotlib don't show any problem in any version when it's out of the virtual environment.