I'm trying to install pygraphviz in order to get layouts for my network. However, I have trouble installing pygraphviz using pip install pygraphviz. I get the following lengthy error:
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/setup.py'"'"'; __file__='"'"'/private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-wheel-ktbtqll_
cwd: /private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/
Complete output (71 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/agraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/testing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pygraphviz
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include/python3.8 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-x86_64-3.8/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:1756:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:1923:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
#include "graphviz/cgraph.h"
^~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/setup.py'"'"'; __file__='"'"'/private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-record-p4ku8efv/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/pygraphviz
cwd: /private/var/folders/w0/pv1mwphj1t552sml25d44bq40000gn/T/pip-install-dabvxss7/pygraphviz/
Complete output (71 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/agraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/testing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pygraphviz
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include/python3.8 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-x86_64-3.8/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:1756:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:1923:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
#include "graphviz/cgraph.h"
^~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c
Does anyone know how to fix this issue. I've been going through a lot of stack overlfow threads, but nothing worked. Thanks for your suggestions!
PyGraphviz requires the graphviz library to be installed. The easiest way to do this is probably to use homebrew, as described in the macOS section of the PyGraphviz installation docs.
I had the same problem, however direct recommendations are not working properly.
So, the sequence is the following:
brew install graphviz
pip install --install-option="--include-path=/opt/local/include" --install-option="--library-path=/opt/local/lib" pygraphviz
The second — is how to force pip to find a correct path to header files after brew install.
Related
I'm having trouble installing pygraphviz and I'm using Anaconda on macOS Monterey.
I already had graphviz on Anaconda. I then did
brew install graphviz
and then
pip install pygraphviz
but I keep getting this error:
Collecting pygraphviz
Using cached pygraphviz-1.7.zip (118 kB)
Building wheels for collected packages: pygraphviz
Building wheel for pygraphviz (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/susiekim4/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"'; __file__='"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-wheel-4fuwg_2b
cwd: /private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/
Complete output (71 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/agraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/testing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pygraphviz
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/susiekim4/opt/anaconda3/include -arch x86_64 -I/Users/susiekim4/opt/anaconda3/include -arch x86_64 -I/Users/susiekim4/opt/anaconda3/include/python3.8 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-x86_64-3.8/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:1756:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/Users/susiekim4/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Users/susiekim4/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:1923:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/Users/susiekim4/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Users/susiekim4/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
#include "graphviz/cgraph.h"
^~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
ERROR: Command errored out with exit status 1:
command: /Users/susiekim4/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"'; __file__='"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-record-pnja99aw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/susiekim4/opt/anaconda3/include/python3.8/pygraphviz
cwd: /private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/
Complete output (71 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/agraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/testing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
creating build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-10.9-x86_64-3.8/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pygraphviz
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/susiekim4/opt/anaconda3/include -arch x86_64 -I/Users/susiekim4/opt/anaconda3/include -arch x86_64 -I/Users/susiekim4/opt/anaconda3/include/python3.8 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-x86_64-3.8/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:1756:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/Users/susiekim4/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Users/susiekim4/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:1923:7: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /* tp_print */
^
/Users/susiekim4/opt/anaconda3/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Users/susiekim4/opt/anaconda3/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
#include "graphviz/cgraph.h"
^~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/susiekim4/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"'; __file__='"'"'/private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-install-zr2twxnl/pygraphviz_e78bc2c823034812a5ffbd6ef61160d7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j5/z34rlnbj2l94p1hh0x_hkkjw0000gn/T/pip-record-pnja99aw/install-record.txt --single-version-externally-managed --compile --install-headers /Users/susiekim4/opt/anaconda3/include/python3.8/pygraphviz Check the logs for full command output.
I've tried pip3 install, pip install cgraph, and the other solutions.
What am I missing?
You can use Homebrew to install graphviz first:
brew install graphviz
Check where it was installed with brew info graphviz.
$ brew info graphviz
graphviz: stable 2.50.0 (bottled), HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/usr/local/Cellar/graphviz/2.50.0 (292 files, 6.9MB) *
...
In my case, it was installed in /usr/local/Cellar/graphviz/2.50.0.
Then run:
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
where you set the GRAPHVIZ_DIR path and the <VERSION> with the version you got with brew info graphviz.
For me it worked using this:
python -m pip install \
--global-option=build_ext \
--global-option="-I$(brew --prefix graphviz)/include/" \
--global-option="-L$(brew --prefix graphviz)/lib/" \
pygraphviz
I copy /opt/homebrew/bin/dot to /usr/local/bin/dot, restart the visual studio code and done!
Command:
sudo cp /opt/homebrew/bin/dot /usr/local/bin/dot
Highly recommend the only solution that worked for me from azabraoo:
pip install --global-option=build_ext --global-option="-I$(brew --prefix graphviz)/include/" --global-option="-L$(brew --prefix graphviz)/lib/" pygraphviz
Mac OS Big Sur update causing pip install requirements for django 1.11 with cffi error. How can I resolve this ?
Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
command: /Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/setup.py'"'"'; __file__='"'"'/private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-record-y3_9oop2/install-record.txt --single-version-externally-managed --compile --install-headers /Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/include/site/python3.8/cffi
cwd: /private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/
Complete output (65 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/local/Cellar/libffi/3.3/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.9-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
*p_printable_filename = PyText_AsUTF8(s);
^ ~~~~~~~~~~~~~~~~
c/_cffi_backend.c:5911:9: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
if (ffi_prep_closure(closure, &cif_descr->cif,
^
/usr/local/Cellar/libffi/3.3/include/ffi.h:341:18: note: 'ffi_prep_closure' has been explicitly marked deprecated here
__attribute__((deprecated))
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
builtins = tstate->interp->builtins;
~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
new1 = PyThreadState_GET()->interp->modules;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
2 warnings and 3 errors generated.
error: command 'gcc' failed with exit status 1
I have the similarity problem.
maybe, your python's version is too high, you can change your python version to 3.6, it will be ok.
I am trying to install the rpy2 package.
When I try pip install rpy2, I get the following error message.
Python 2.7.13
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)
Mac OS X 10.12.5
Collecting rpy2
Using cached rpy2-2.8.6.tar.gz
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from rpy2)
Requirement already satisfied: singledispatch in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from rpy2)
Installing collected packages: rpy2
Running setup.py install for rpy2 ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1x/p2n9lxmj7wxgkftf4b12g3gr0000gn/T/pip-build-aCVavk/rpy2/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/1x/p2n9lxmj7wxgkftf4b12g3gr0000gn/T/pip-MY5Bw0-record/install-record.txt --single-version-externally-managed --compile:
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
/Library/Frameworks/R.framework/Resources/bin/R CMD config --ldflags
/Library/Frameworks/R.framework/Resources/bin/R CMD config --cppflags
Compilation parameters for rpy2's C components:
include_dirs = ['/Library/Frameworks/R.framework/Resources/include']
library_dirs = ['/usr/local/lib']
libraries = ['pcre', 'lzma', 'bz2', 'z', 'icucore', 'm', 'iconv']
extra_link_args = ['-fopenmp', '-F/Library/Frameworks/R.framework/..', '-framework', 'R']
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/rpy2
copying ./rpy/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2
copying ./rpy/rpy_classic.py -> build/lib.macosx-10.6-intel-2.7/rpy2
copying ./rpy/tests.py -> build/lib.macosx-10.6-intel-2.7/rpy2
copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.6-intel-2.7/rpy2
creating build/lib.macosx-10.6-intel-2.7/rpy2/rlike
copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike
copying ./rpy/rlike/container.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike
copying ./rpy/rlike/functional.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike
copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike
creating build/lib.macosx-10.6-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike/tests
copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rlike/tests
creating build/lib.macosx-10.6-intel-2.7/rpy2/rinterface
copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface
creating build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpSymbol.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/tests
creating build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/constants.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/environments.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/functions.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/help.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/language.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/methods.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/packages.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/packages_utils.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/robject.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects
creating build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/tests
creating build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/dplyr.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/grdevices.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
copying ./rpy/robjects/lib/tidyr.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib
creating build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/test_dplyr.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib/tests
copying ./rpy/robjects/lib/tests/test_grdevices.py -> build/lib.macosx-10.6-intel-2.7/rpy2/robjects/lib/tests
creating build/lib.macosx-10.6-intel-2.7/rpy2/interactive
copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/interactive
copying ./rpy/interactive/packages.py -> build/lib.macosx-10.6-intel-2.7/rpy2/interactive
copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.6-intel-2.7/rpy2/interactive
creating build/lib.macosx-10.6-intel-2.7/rpy2/interactive/tests
copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/interactive/tests
creating build/lib.macosx-10.6-intel-2.7/rpy2/ipython
copying ./rpy/ipython/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython
copying ./rpy/ipython/ggplot.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython
copying ./rpy/ipython/html.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython
copying ./rpy/ipython/rmagic.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython
creating build/lib.macosx-10.6-intel-2.7/rpy2/ipython/tests
copying ./rpy/ipython/tests/__init__.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython/tests
copying ./rpy/ipython/tests/test_rmagic.py -> build/lib.macosx-10.6-intel-2.7/rpy2/ipython/tests
running build_clib
building 'r_utils' library
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/rpy
creating build/temp.macosx-10.6-intel-2.7/rpy/rinterface
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./rpy/rinterface -I/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/r_utils.c -o build/temp.macosx-10.6-intel-2.7/./rpy/rinterface/r_utils.o
./rpy/rinterface/r_utils.c:230:40: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
ExternallyManagedVector *extvector = malloc(sizeof(ExternallyManagedVector));
^
./rpy/rinterface/r_utils.c:230:40: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
1 warning generated.
./rpy/rinterface/r_utils.c:230:40: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
ExternallyManagedVector *extvector = malloc(sizeof(ExternallyManagedVector));
^
./rpy/rinterface/r_utils.c:230:40: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
1 warning generated.
ar rc build/temp.macosx-10.6-intel-2.7/libr_utils.a build/temp.macosx-10.6-intel-2.7/./rpy/rinterface/r_utils.o
ranlib build/temp.macosx-10.6-intel-2.7/libr_utils.a
running build_ext
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
building 'rpy2.rinterface._rinterface' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.6-intel-2.7/./rpy/rinterface/_rinterface.o
In file included from ./rpy/rinterface/_rinterface.c:52:
In file included from ./rpy/rinterface/_rinterface.h:8:
In file included from /Library/Frameworks/R.framework/Resources/include/R.h:81:
/Library/Frameworks/R.framework/Resources/include/Rconfig.h:20:9: warning: 'SIZEOF_SIZE_T' macro redefined [-Wmacro-redefined]
#define SIZEOF_SIZE_T 8
^
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:56:17: note: previous definition is here
# define SIZEOF_SIZE_T 4
^
In file included from ./rpy/rinterface/_rinterface.c:98:
./rpy/rinterface/embeddedr.h:6:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_INITIALIZED;
^
./rpy/rinterface/embeddedr.h:7:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_BUSY;
^
In file included from ./rpy/rinterface/_rinterface.c:116:
./rpy/rinterface/embeddedr.c:5:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_INITIALIZED = 0x01;
^
./rpy/rinterface/embeddedr.c:6:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_BUSY = 0x02;
^
./rpy/rinterface/embeddedr.c:48:12: warning: unused variable 'res' [-Wunused-variable]
SEXP res = rpy2_remove(Rf_mkString(name_buf),
^
In file included from ./rpy/rinterface/_rinterface.c:119:
./rpy/rinterface/sexp.c:742:13: warning: unused variable 'copy' [-Wunused-variable]
PyObject *copy = Py_True;
^
./rpy/rinterface/_rinterface.c:347:3: warning: variable 'consolecallback' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
./rpy/rinterface/_rinterface.c:373:7: note: uninitialized use occurs here
if (consolecallback == NULL) {
^~~~~~~~~~~~~~~
./rpy/rinterface/_rinterface.c:339:24: note: initialize the variable 'consolecallback' to silence this warning
void *consolecallback;
^
= NULL
In file included from ./rpy/rinterface/_rinterface.c:52:
./rpy/rinterface/_rinterface.h:203:44: warning: unused function 'PyRinterface_IsInitialized' [-Wunused-function]
static PyRinterface_IsInitialized_RETURN PyRinterface_IsInitialized PyRinterface_IsInitialized_PROTO;
^
./rpy/rinterface/_rinterface.h:204:38: warning: unused function 'PyRinterface_FindFun' [-Wunused-function]
static PyRinterface_FindFun_RETURN PyRinterface_FindFun PyRinterface_FindFun_PROTO;
^
In file included from ./rpy/rinterface/_rinterface.c:122:
./rpy/rinterface/sequence.c:2173:1: warning: unused function 'ComplexVectorSexp_AsSexp' [-Wunused-function]
ComplexVectorSexp_AsSexp(PyObject *pyfloat) {
^
11 warnings generated.
In file included from ./rpy/rinterface/_rinterface.c:98:
./rpy/rinterface/embeddedr.h:6:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_INITIALIZED;
^
./rpy/rinterface/embeddedr.h:7:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
extern const unsigned int const RPY_R_BUSY;
^
In file included from ./rpy/rinterface/_rinterface.c:116:
./rpy/rinterface/embeddedr.c:5:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_INITIALIZED = 0x01;
^
./rpy/rinterface/embeddedr.c:6:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const unsigned int const RPY_R_BUSY = 0x02;
^
./rpy/rinterface/embeddedr.c:48:12: warning: unused variable 'res' [-Wunused-variable]
SEXP res = rpy2_remove(Rf_mkString(name_buf),
^
In file included from ./rpy/rinterface/_rinterface.c:119:
./rpy/rinterface/sexp.c:742:13: warning: unused variable 'copy' [-Wunused-variable]
PyObject *copy = Py_True;
^
./rpy/rinterface/_rinterface.c:347:3: warning: variable 'consolecallback' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
./rpy/rinterface/_rinterface.c:373:7: note: uninitialized use occurs here
if (consolecallback == NULL) {
^~~~~~~~~~~~~~~
./rpy/rinterface/_rinterface.c:339:24: note: initialize the variable 'consolecallback' to silence this warning
void *consolecallback;
^
= NULL
In file included from ./rpy/rinterface/_rinterface.c:52:
./rpy/rinterface/_rinterface.h:203:44: warning: unused function 'PyRinterface_IsInitialized' [-Wunused-function]
static PyRinterface_IsInitialized_RETURN PyRinterface_IsInitialized PyRinterface_IsInitialized_PROTO;
^
./rpy/rinterface/_rinterface.h:204:38: warning: unused function 'PyRinterface_FindFun' [-Wunused-function]
static PyRinterface_FindFun_RETURN PyRinterface_FindFun PyRinterface_FindFun_PROTO;
^
In file included from ./rpy/rinterface/_rinterface.c:122:
./rpy/rinterface/sequence.c:2173:1: warning: unused function 'ComplexVectorSexp_AsSexp' [-Wunused-function]
ComplexVectorSexp_AsSexp(PyObject *pyfloat) {
^
10 warnings generated.
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/./rpy/rinterface/_rinterface.o -L/usr/local/lib -Lbuild/temp.macosx-10.6-intel-2.7 -L/usr/local/lib -lpcre -llzma -lbz2 -lz -licucore -lm -liconv -lr_utils -o build/lib.macosx-10.6-intel-2.7/rpy2/rinterface/_rinterface.so -fopenmp -F/Library/Frameworks/R.framework/.. -framework R
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1x/p2n9lxmj7wxgkftf4b12g3gr0000gn/T/pip-build-aCVavk/rpy2/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/1x/p2n9lxmj7wxgkftf4b12g3gr0000gn/T/pip-MY5Bw0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/1x/p2n9lxmj7wxgkftf4b12g3gr0000gn/T/pip-build-aCVavk/rpy2/
For in a case, my clang version is
clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Could anyone solve this problem?
Thanks
I am having following issue when installing mitmproxy through pip.
I have tried other fixed related to egg error. Here on stack overflow.
Can't install via pip because of egg_info error
pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed with error code 1'
104:bin user129856$ sudo pip install mitmproxy
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mitmproxy
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading mitmproxy-0.12.1.tar.gz (6.5MB)
100% |████████████████████████████████| 6.5MB 18kB/s
Collecting pyperclip>=1.5.8 (from mitmproxy)
Downloading pyperclip-1.5.11.zip
Collecting pyasn1>0.1.2 (from mitmproxy)
Downloading pyasn1-0.1.8.tar.gz (75kB)
100% |████████████████████████████████| 77kB 827kB/s
Collecting tornado>=4.0.2 (from mitmproxy)
Downloading tornado-4.2.tar.gz (433kB)
100% |████████████████████████████████| 434kB 260kB/s
Collecting lxml>=3.3.6 (from mitmproxy)
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 32kB/s
Collecting netlib<0.13,>=0.12 (from mitmproxy)
Downloading netlib-0.12.1.tar.gz (64kB)
100% |████████████████████████████████| 65kB 729kB/s
Complete output from command python setup.py egg_info:
warning: no files found matching 'OpenSSL/RATIONALE'
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
zip_safe flag not set; analyzing archive contents...
Installed /private/tmp/pip-build-wOHXdq/netlib/.eggs/pyOpenSSL-0.15.1-py2.7.egg
Searching for cffi
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.1.2
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=ca6e6c45b45caa87aee9adc7c796eaea
Processing cffi-1.1.2.tar.gz
Writing /tmp/easy_install-_e2qwn/cffi-1.1.2/setup.cfg
Running cffi-1.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_e2qwn/cffi-1.1.2/egg-dist-tmp-382ExN
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/tmp/pip-build-wOHXdq/netlib/setup.py", line 87, in <module>
"install": CFFIInstall,
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 268, in __init__
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 836, in resolve
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1081, in best_match
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1093, in obtain
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 629, in easy_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 659, in install_item
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 842, in install_eggs
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1058, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-wOHXdq/netlib
Updated after first response for libffi:
After Installing libffi, it started breaking on libxml. I found the lxml on pip.
and its break again and looking for libxml :(
104:~ user2368563$ brew install libxml
Error: No available formula for libxml
Searching formulae...
libxml++ libxml2 libxmlsec1
Searching taps...
homebrew/versions/libxml278
104:~ user2368563$ brew install libxml2
Warning: libxml2-2.9.2 already installed
104:bin user2368563$ sudo pip install lxml
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alokchoudhary/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting lxml
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 116kB/s
Installing collected packages: lxml
Running setup.py install for lxml
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-record/install-record.txt --single-version-externally-managed --compile:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
creating build
creating build/lib.macosx-10.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml
creating build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.10-intel-2.7
creating build/temp.macosx-10.10-intel-2.7/src
creating build/temp.macosx-10.10-intel-2.7/src/lxml
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/libxml2 -I/private/tmp/pip-build-bDtXaT/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.10-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
In file included from src/lxml/lxml.etree.c:239:
/private/tmp/pip-build-bDtXaT/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bDtXaT/lxml
If you read through your log carefully you might spot this line:
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
The "fatal error" part is especially important. :)
This means that the ffi headers couldn't be located by your compiler. I'm not sure how to do it since I'm not a Mac user but maybe homebrew could help you, or Google. To me it seems like you should install homebrew and then just run:
brew install libffi
Then try pip again.
Edit
The full list of dependencies are:
python
libffi
libssl
libxml2
libxslt1
So you'll need all those, and their headers, if you want to continue down this path.
An easier solution is to download pre-built binaries for your Mac, from mitmproxy.org (OSX Mountain Lion and later). I found this info in the installation docs.
I had the vcvarsall.bat problem, so I followed the directions here How to use MinGW's gcc compiler when installing Python package using Pip? .
Now, when using pip install lxml with Python 3.2.2 on Windows 7 I get the following error:
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\Pytho
n32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxml.et
ree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
The entire output:
C:\Python32\Scripts>pip-3.2.exe install lxml
Downloading/unpacking lxml
Real name of requirement lxml is lxml
Downloading lxml-2.3.3.tar.gz (3.1Mb): 3.1Mb downloaded
Running setup.py egg_info for package lxml
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxm
l'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxm
l'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
Installing collected packages: lxml
Running setup.py install for lxml
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
Using build configuration of libxslt
building 'lxml.etree' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\P
ython32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxm
l.etree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Complete output from command C:\Python32\python.exe -c "import setuptools;__
file__='C:\\Python32\\Scripts\\build\\lxml\\setup.py';exec(compile(open(__file__
).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-ext
ernally-managed --record c:\windows\temp\pip-w4t58y-record\install-record.txt:
Building lxml version 2.3.3.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\n
operable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build\lib.win32-3.2
creating build\lib.win32-3.2\lxml
copying src\lxml\builder.py -> build\lib.win32-3.2\lxml
copying src\lxml\cssselect.py -> build\lib.win32-3.2\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-3.2\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-3.2\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-3.2\lxml
copying src\lxml\sax.py -> build\lib.win32-3.2\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-3.2\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-3.2\lxml
copying src\lxml\__init__.py -> build\lib.win32-3.2\lxml
creating build\lib.win32-3.2\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_dictmixin.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-3.2\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-3.2\lxml\html
creating build\lib.win32-3.2\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.2\lxml\isoschema
tron
copying src\lxml\etreepublic.pxd -> build\lib.win32-3.2\lxml
copying src\lxml\tree.pxd -> build\lib.win32-3.2\lxml
copying src\lxml\etree_defs.h -> build\lib.win32-3.2\lxml
creating build\lib.win32-3.2\lxml\isoschematron\resources
creating build\lib.win32-3.2\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win
32-3.2\lxml\isoschematron\resources\rng
creating build\lib.win32-3.2\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-3
.2\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-3
.2\lxml\isoschematron\resources\xsl
creating build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xsl
t1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_e
xpand.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron
-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_inclu
de.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xs
lt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron
_message.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schemat
ron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron
_skeleton_for_xslt1.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\
iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_x
slt1.xsl -> build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-
xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt ->
build\lib.win32-3.2\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build\temp.win32-3.2
creating build\temp.win32-3.2\Release
creating build\temp.win32-3.2\Release\src
creating build\temp.win32-3.2\Release\src\lxml
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\Pytho
n32\PC -c src/lxml/lxml.etree.c -o build\temp.win32-3.2\Release\src\lxml\lxml.et
ree.o -w
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
----------------------------------------
Command C:\Python32\python.exe -c "import setuptools;__file__='C:\\Python32\\Scr
ipts\\build\\lxml\\setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --single-version-externally-managed --record
c:\windows\temp\pip-w4t58y-record\install-record.txt failed with error code 1
Storing complete log in C:\Users\x\AppData\Roaming\pip\pip.log
The same thing happens with easy_install, but it doesn't happen when I install a package like 'bible'.
It is a known issue with distutils: mingw & -mno-cygwin with recent gcc.
See related SO question: Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin'.
Try to remove -mno-cygwin from Mingw32CCompiler.