Skip to content
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

Fail to install matplotlib by "pip install" on SmartOS(like open solaris system) #6528

Closed
FrankYu opened this issue Jun 2, 2016 · 2 comments
Labels

Comments

@FrankYu
Copy link
Contributor

FrankYu commented Jun 2, 2016

pip 8.1.2 from /opt/local/lib/python2.7/site-packages (python 2.7)
#python --version
Python 2.7.11

#pip install matplotlib
Collecting matplotlib
  Using cached matplotlib-1.5.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in /opt/local/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /opt/local/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pytz in /opt/local/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): cycler in /opt/local/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pyparsing!=2.0.4,>=1.5.6 in /opt/local/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /opt/local/lib/python2.7/site-packages (from python-dateutil->matplotlib)
Building wheels for collected packages: matplotlib
  Running setup.py bdist_wheel for matplotlib ... error
  Complete output from command /opt/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-e9SoSk/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpzh9uDvpip-wheel- --python-tag cp27:
  ============================================================================
  Edit setup.cfg to change the build options

  BUILDING MATPLOTLIB
              matplotlib: yes [1.5.1]
                  python: yes [2.7.11 (default, May  3 2016, 16:18:40)  [GCC
                          4.9.3]]
                platform: yes [sunos5]

  REQUIRED DEPENDENCIES AND EXTENSIONS
                   numpy: yes [version 1.11.0]
                dateutil: yes [using dateutil version 2.5.3]
                    pytz: yes [using pytz version 2016.4]
                  cycler: yes [using cycler version 0.10.0]
                 tornado: yes [tornado was not found. It is required for the
                          WebAgg backend. pip/easy_install may attempt to
                          install it after matplotlib.]
               pyparsing: yes [using pyparsing version 2.1.4]
                  libagg: yes [pkg-config information for 'libagg' could not
                          be found. Using local copy.]
                freetype: yes [version 2.6.2]
                     png: yes [version 1.6.21]
                   qhull: yes [pkg-config information for 'qhull' could not be
                          found. Using local copy.]

  OPTIONAL SUBPACKAGES
             sample_data: yes [installing]
                toolkits: yes [installing]
                   tests: yes [using nose version 1.3.7 / mock is required to
                          run the matplotlib test suite. Please install it
                          with pip or your preferred tool to run the test
                          suite]
          toolkits_tests: yes [using nose version 1.3.7 / mock is required to
                          run the matplotlib test suite. Please install it
                          with pip or your preferred tool to run the test
                          suite]

  OPTIONAL BACKEND EXTENSIONS
                  macosx: no  [Mac OS-X only]
                  qt5agg: no  [PyQt5 not found]
                  qt4agg: no  [PySide not found; PyQt4 not found]
                 gtk3agg: no  [Requires pygobject to be installed.]
               gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                  gtkagg: no  [Requires pygtk]
                   tkagg: no  [TKAgg requires Tkinter.]
                   wxagg: no  [requires wxPython]
                     gtk: no  [Requires pygtk]
                     agg: yes [installing]
                   cairo: no  [cairocffi or pycairo not found]
               windowing: no  [Microsoft Windows only]

  OPTIONAL LATEX DEPENDENCIES
                  dvipng: no
             ghostscript: no
                   latex: no
                 pdftops: no

  OPTIONAL PACKAGE DATA
                    dlls: no  [skipping due to configuration]

  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.solaris-2.11-i86pc.64bit-2.7
  copying lib/pylab.py -> build/lib.solaris-2.11-i86pc.64bit-2.7
  creating build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/markers.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/texmanager.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/afm.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/cbook.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/mlab.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/blocking_input.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
  copying lib/matplotlib/patches.py -> build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib
.....
.....
  set build/lib.solaris-2.11-i86pc.64bit-2.7/matplotlib/_version.py to '1.5.1'
  running build_ext
  building 'matplotlib.ft2font' extension
  creating build/temp.solaris-2.11-i86pc.64bit-2.7
  creating build/temp.solaris-2.11-i86pc.64bit-2.7/src
  gcc -fno-strict-aliasing -pipe -O2 -pipe -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/opt/local/include -I/opt/local/include/db4 -I/opt/local/include/ncurses -DNDEBUG -pipe -O2 -pipe -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/opt/local/include -I/opt/local/include/db4 -I/opt/local/include/ncurses -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/opt/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/usr/local/include -I. -I/opt/local/include/python2.7 -c src/ft2font.cpp -o build/temp.solaris-2.11-i86pc.64bit-2.7/src/ft2font.o
  gcc -fno-strict-aliasing -pipe -O2 -pipe -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/opt/local/include -I/opt/local/include/db4 -I/opt/local/include/ncurses -DNDEBUG -pipe -O2 -pipe -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/opt/local/include -I/opt/local/include/db4 -I/opt/local/include/ncurses -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/opt/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/usr/local/include -I. -I/opt/local/include/python2.7 -c src/ft2font_wrapper.cpp -o build/temp.solaris-2.11-i86pc.64bit-2.7/src/ft2font_wrapper.o
  In file included from /opt/local/include/python2.7/Python.h:44:0,
                   from src/mplutils.h:21,
                   from src/ft2font_wrapper.cpp:1:
  /usr/include/unistd.h:521:75: error: declaration of C function 'void swab(const void*, void*, ssize_t)' conflicts with
  In file included from /opt/local/include/python2.7/Python.h:42:0,
                   from src/mplutils.h:21,
                   from src/ft2font_wrapper.cpp:1:
  /usr/include/stdlib.h:169:13: error: previous declaration 'void swab(const char*, char*, ssize_t)' here
  error: command 'gcc' failed with exit status 1

@tacaswell tacaswell added the Build label Jun 3, 2016
@tacaswell
Copy link
Member

tacaswell commented Jun 3, 2016

You might want to bump this to the SmartOS or cpython mailing lists, it looks like the conflict is between /usr/include/unistd.h and /usr/include/stdlib.h which are both included from Python.h.

Can you build a simple c program that imports includes Python.h on your system?

@FrankYu
Copy link
Contributor Author

FrankYu commented Jun 4, 2016

@tacaswell
Thanks. I have installed it from https://pkgsrc.joyent.com/packages/SmartOS/2016Q1/x86_64/All/.

@FrankYu FrankYu closed this as completed Jun 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants