Home > Backend Development > Python Tutorial > Why Does `pip install psycopg2` Fail with \'unknown argument: \'-mno-fused-madd\'\' on OS X?

Why Does `pip install psycopg2` Fail with \'unknown argument: \'-mno-fused-madd\'\' on OS X?

DDD
Release: 2024-11-25 10:53:11
Original
282 people have browsed it

Why Does `pip install psycopg2` Fail with

clang error: unknown argument: '-mno-fused-madd' while installing psycopg2

This error occurs when attempting to install psycopg2 via pip on Mavericks 10.9. It results from an unknown argument, '-mno-fused-madd', passed to the clang compiler.

Resolution:

To resolve this issue, modify the environment variables before compilation by setting the following:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Copy after login

Additional Considerations for Superuser Installation:

If the installation is performed as a superuser, add the following prefix to the pip command:

sudo -E pip install psycopg2
Copy after login

OSX Updates and Workaround Validity:

This workaround was necessary for OS X 10.8.x and Xcode 5.1 . However, as of OS X 10.9.3, Apple has fixed this issue for system Pythons (2.7, 2.6, and 2.5). Therefore, the workaround is no longer required for the latest Mavericks and Xcode 5.1 versions.

The above is the detailed content of Why Does `pip install psycopg2` Fail with \'unknown argument: \'-mno-fused-madd\'\' on OS X?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template