installing lxml to run with python3.4 on OS Mavericks
From the log file I gather that everything runs more or less as expected until it hits a glitch towards the very end, which I reproduce below. I don't really understand them, but I note that the whole installation
I have tried to install lxml on my laptop, which runs OS X Mavericks. Not much success, and from scanning the Web, I'm not alone. There are actually two issues here. First, I want to install lxml, and second, I want it to run with Python 3.4, which I successfully installed on my computer. I used the install routine recommended in Building lxml in Mac OS X and used the command STATIC_DEPS=true pip install lxml process is geared towards the 2.7 version of Python that is part of the system. I haven't found instructons on how to force pip to look for Python 3.4. Perhaps it doesn't matter. I'll be grateful for help. On my desktop Mac (Lion) I managed to associate an earlier version of lxml with Python3, but I don't remember how I did it. copying /Users/martin/build/lxml/build/tmp/libxml2/include/libxslt/xsltInternals.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes/libxslt copying /Users/martin/build/lxml/build/tmp/libxml2/include/libxslt/xsltlocale.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes/libxslt copying /Users/martin/build/lxml/build/tmp/libxml2/include/libxslt/xsltutils.h -> build/lib.macosx-10.9-intel-2.7/lxml/includes/libxslt running build_ext building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -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/Users/martin/build/lxml/build/tmp/libxml2/include -I/Users/martin/build/lxml/build/tmp/libxml2/include/libxml2 -I/Users/martin/build/lxml/build/tmp/libxml2/include/libxslt -I/Users/martin/build/lxml/build/tmp/libxml2/include/libexslt -I/Users/martin/build/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.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future error: command 'cc' failed with exit status 1 ---------------------------------------- Command /usr/bin/python -c "import setuptools;__file__='/Users/martin/build/lxml/setup.py';exec(compile(open(_ _file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-36fCYk-record/install-record.txt failed with error code 1 in /Users/martin/build/lxml Exception information: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.p y", line 250, in run requirement_set.install(install_options, global_options) File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install requirement.install(install_options, global_options) File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command /usr/bin/python -c "import setuptools;__file__='/Users/martin/build/lxml/setup.py';exec(compile(open(_ _file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-36fCYk-record/install-record.txt failed with error code 1 in /Users/martin/build/lxml Martin Mueller Professor emeritus of English and Classics
On Thu, Apr 17, 2014 at 02:46:59AM +0000, Martin Mueller wrote:
I have tried to install lxml on my laptop, which runs OS X Mavericks. Not much success, and from scanning the Web, I'm not alone.
There are actually two issues here. First, I want to install lxml, and second, I want it to run with Python 3.4, which I successfully installed on my computer.
I used the install routine recommended in Building lxml in Mac OS X and used the command
STATIC_DEPS=true pip install lxml
From the log file I gather that everything runs more or less as expected until it hits a glitch towards the very end, which I reproduce below. I don't really understand them, but I note that the whole installation process is geared towards the 2.7 version of Python that is part of the system. I haven't found instructons on how to force pip to look for Python 3.4. Perhaps it doesn't matter.
It does: pip installs stuff for the same version of Python that you used to run pip. You can use 'python3.4 -mpip install lxml', or maybe your Python 3.4 install created a /usr/local/bin/pip3.4 script or something. <snip>
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
This sounds familiar: http://bugs.python.org/issue21244 https://github.com/python-imaging/Pillow/issues/527 Try the suggested workaround: export CFLAGS=-Qunused-arguments STATIC_DEPS=true pip install lxml Marius Gedminas -- Finding segfaults in CPython is "easy". As in all you need is armin, a bit of coffee and a free day. -- Maciej Fijalkowski on Armin Rigo's skills for finding segfaults
participants (2)
-
Marius Gedminas -
Martin Mueller