Home >Backend Development >Python Tutorial >How to Fix the `-mno-fused-madd` Error During psycopg2 Installation on macOS?

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

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-11-27 10:17:11359browse

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]

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

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!

Statement:
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