How to Fix the `-mno-fused-madd` Error During psycopg2 Installation on macOS?

Mary-Kate Olsen
Release: 2024-11-27 10:17:11
Original
289 people have browsed it

How to Fix the `-mno-fused-madd` Error During psycopg2 Installation on macOS?

Error Encountered During psycopg2 Installation

Attempting to install psycopg2 using pip on Mavericks 10.9 results in the following error:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
Copy after login

Addressing the Error

To resolve this error, suppress the 'mno-fused-madd' warning by setting the environment variables before compiling:

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

Subsequently, running the installation command should proceed successfully.

Additional Considerations

  • When installing as a superuser, use sudo -E to avoid permission issues.
  • In OS X 10.9.3, the issue has been resolved for the updated system Pythons.
  • If using Mountain Lion (10.8.x) with Xcode 5.1 , the workaround is still required.

The above is the detailed content of How to Fix the `-mno-fused-madd` Error During psycopg2 Installation on macOS?. 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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template