Harpal
Harpal

Reputation: 12587

Error while install lxml

I'm trying to install lxml with pip. I received this initial error when running my script:

bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?

A quick search of the above error (such as here) revealed I need to install lxml.

While trying to install lxml I receive the following error:

clang: error: unknown argument: '-mno-fused-madd'

error: command 'cc' failed with exit status 1

Any idea what is going on?

Upvotes: 0

Views: 173

Answers (1)

falsetru
falsetru

Reputation: 369394

According to Xcode 5 Release Notes:

The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.

...

To workaround this issue, set the ARCHFLAGS environment variable to downgrade the error to a warning. For example, you can install a Python native extension with:

$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future \
  easy_install ExtensionName

Set following environment variable before installing lxml:

export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

Upvotes: 1

Related Questions