Problems installing libxml2 on Mac OS X

I am trying to install libxml2 on my Mac (OS 10.6.4). I'm actually trying to run a Scrapy script in Python, which required me to install Twisted, Zope and now libxml2. I downloaded the latest version (2.7.7, from xmlsoft.org) and tried to follow these instructions here . To summarize, I tried this command (in a python subdirectory):

python setup.py --static-deps --libxml2-version=2.7.7 -- libxslt-version=1.1.24

I get this error:

failed to find headers for libxml2: update includes_dir

Any ideas?

I also tried to execute this command:

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.6/

And I get the following error:

configure: error: no acceptable C compiler found in $PATH

Does this clarify the situation?

+3
source share
4 answers

, libxml2. . -, XCode, Apple Developer Tools. , OX 10.6.4, .

libxml2 :

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/
make
sudo make install

Python libxml2 :

python setup.py install

.

+2

--libxml2-version=2.7.7?

+1

, , pip.

failed to find headers for libxml2: update includes_dir

, xcode

xcode-select --install

, , .

+1

virtualenv, libxml2, -:

echo '/usr/local/opt/libxml2/lib/python2.7/site-packages/'  > /Users/panchicore/.virtualenvs/<virtualenv-name>/lib/python2.7/site-packages/homebrew.pth
0

Source: https://habr.com/ru/post/1760174/


All Articles