mac os下Python模組安裝錯誤

2022-09-20 04:18:14 字數 581 閱讀 8252

環境:mac os x 10.9.2

python版本:2.7.5

easy_install對於python相當於apt之於ubuntu,安裝其他庫十分方便,但是最近安裝pil(python imaging library),這個強大的圖形庫時竟然出錯了,十分抓狂。錯誤資訊如下: 

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

經網上查證:

,貌似是mac os的xcode從5.1起給編譯器規定對於未知引數傳入視為error,我們需要使用archflags將該error降級為warning,因此最後的安裝命令應該如下:

sudo archflags=-wno-error=unused-command-line-argument-hard-error-in-future easy_install pil

Macos下安裝pypcap模組經歷

淚奔,搞了兩天總算是安上了pypcap這個模組 先是這個問題卡了我很久 found libraries in none traceback most recent call last file line 1,in file private tmp pip build 1rlirk pypcap se...

MacOS下通過終端切換python版本

在macos下安裝了多個python版本後 如python2和python3 通過終端命令可以切換python版本 以python2和python3.7為例 在終端輸入 open bash profile寫入python的外部環境變數 注意python版本是3.7export path librar...

Python模組如何安裝 並確認模組已經安裝好?

看自己有沒有安裝好,最簡單的辦法在可以再控制台下 c users sony python python 2.7.6 default,nov 10 2013,19 24 18 msc v.1500 32 bit intel on win 32 import numpy import scipy imp...