1. 程式人生 > >MAC下安裝pycurl報錯的解決方法

MAC下安裝pycurl報錯的解決方法

MAC下安裝pycurl  開啟命令列執行:

sudo pip install pycurl -i https://pypi.tuna.tsinghua.edu.cn/simple

報錯:

    1 warning generated.

    In file included from src/threadsupport.c:1:

    src/pycurl.h:190:5: warning: "libcurl was compiled with SSL support, but configure could not determine which "      "library was used; thus no SSL crypto locking callbacks will be set, which may "      "cause random crashes on SSL requests" [-W#warnings]

    #   warning \

        ^

    1 warning generated.

    cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.12-intel-2.7/src/docstrings.o build/temp.macosx-10.12-intel-2.7/src/easy.o build/temp.macosx-10.12-intel-2.7/src/module.o build/temp.macosx-10.12-intel-2.7/src/multi.o build/temp.macosx-10.12-intel-2.7/src/oscompat.o build/temp.macosx-10.12-intel-2.7/src/pythoncompat.o build/temp.macosx-10.12-intel-2.7/src/share.o build/temp.macosx-10.12-intel-2.7/src/stringcompat.o build/temp.macosx-10.12-intel-2.7/src/threadsupport.o -lcurl -o build/lib.macosx-10.12-intel-2.7/pycurl.so

    running install_lib

    copying build/lib.macosx-10.12-intel-2.7/pycurl.so -> /Library/Python/2.7/site-packages

    running install_data

    creating /System/Library/Frameworks/Python.framework/Versions/2.7/share

    error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted

    ----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-thsXKy/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2Geh3A-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-thsXKy/pycurl/

網上查了下原因,要加上--user就好了

sudo pip install pycurl -i https://pypi.tuna.tsinghua.edu.cn/simple --user


這樣就可以安裝成功了。

備註:

將 pip 安裝的包預設安裝在使用者目錄。

說起來很簡單,只需跟引數 --user 即可


相關推薦

MAC安裝pycurl解決方法

MAC下安裝pycurl  開啟命令列執行: sudo pip install pycurl -i https://pypi.tuna.tsinghua.edu.cn/simple 報錯:  

安裝mysql解決方法

mysql報錯1:Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or

suse啟動vsftp解決方法

suse下啟動vsftp報錯解決 在suse啟動vsftp服務 service vsftp start 報 Starting vsftpd startproc: exit status of pare

python pip安裝MySQLdb解決方法

一 進入網站 下載MySQL-python相關軟體。 二 下載後解壓,有兩個安裝包 MySQL-python-1.2.3.win32-py2.7.exe MySQL-python-1.2.3

Ubuntu16.04python3.6安裝Scrapy解決辦法

首先安裝scrapy是沒問題的,但是當匯入模組時就報錯了,具體如下: root@ubuntu:/usr/bin# pip3 install scrapy Collecting scrapy Downloading https://files.py

Mac安裝mongoldb Failed to set up listener: SocketException: Address already in use

錯誤日誌2018-06-08T22:25:09.118+0800 E STORAGE [initandlisten] Failed to set up listener: SocketExceptio

Mac 安裝pygame的錯誤解決方法

我的mac系統版本是10.7.5。在mac下安裝python匯入pygame時往往會出現如下錯誤: Traceback(most recent call last):File"<pyshell#0>", line 1,in<module>import

使用Homebrew安裝軟體解決方法

報錯資訊如下: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installat

Python2.7 安裝numpy解決方法

Windows 10下用pip安裝numpy包報錯: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat

關於編譯安裝apache解決方法

#./configure --prefix……檢查編輯環境時出現: checking for APR... no configure: error: APR not found .  Please read the documentation 解決辦法: 1.下載所需

Mac安裝mysql失敗的解決方法

我安裝的版本是mysql-5.6.21-osx10.9-x86_64.dmg,在Mac OS X 10.10系統上安裝時提示安裝失敗,如下圖。 解決方法 在安裝過程中的第三步,選擇安裝型別時選擇自定義,把Starup Item的勾選取消,不讓mysql作為開啟啟動項,則可

mac安裝xgboost:clang: error: : errorunsupported option '-fopenmp'

在Mac os下安裝xgboostgit clone --recursive https://github.com/dmlc/xgboost cd xgboost; cp make/minimum.mk ./config.mk; make -j4 這是不支援多執行緒版本的,

macpython安裝scrapy解決方案

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘incremental>=16.10.1’) Command “python setup.p

zabbix源碼安裝流程及解決方法

zabbixzabbix源碼安裝流程及報錯解決方法一. zabbix的介紹1) zabbix是什麽zabbix是一款基於web頁面的、開源的、企業級的,支持分布式部署的監控軟件。2)2.zabbix的作用監控windows和Linux主機上的軟硬件狀態。監控各網絡設備,如路由器、交換機、防火墻、f5、打印機等

CentOS7使用rpm-gpg-key-epel-6解決方法

centos7今天遇到一個在CentOS7下用rpm-gpg-key-epel-6的文件安裝yum install gridengine-6.2u5-10.el6.4.x86_64 gridengine-devel-6.2u5-10.el6.4.x86_64 gridengine-execd-6.2u5-10

解決Macsed命令的問題

技術 -i clas idt brush 命令 參數 ima inf 在Mac上準備批量替換一些文字,使用sed命令,如下: sed -i ‘s/xxx/yyy/g‘ file 同樣的命令在Linux上是可以成功運行的,註意Mac下man sed中-i參數的說明:

windows安裝torchvision解決方案

環境 低版本 圖片 whl import cond dll 分享圖片 錯誤信息 今晚再次多次嘗試在win10下安裝pytorch以及torchvision,終於把上次的坑給填了。來來回回裝卸各種包有幾十遍了,稍微記錄一下,給後面遇到同樣問題的人一點提醒。 首先,介紹下安裝流

安裝exchange 2013解決方法

安裝exchange 2013報錯解決方法 錯誤:執行"$error.Clear(); if ( ($server -eq $null) -and ($RoleIsDatacenter -ne $true) ){Update-RmsSharedIdentity -ServerName $RoleNetBIO

【linux】linux安裝nginx時,make解決方法

目錄 一、報錯情況 二、解決方法 三、openssl舊版本下載和安裝 一、報錯情況 (1)輸入命令,報錯: make (2)具體報錯: make[1]: *** [objs/src/event/ngx_event_openssl.o] 錯誤

百度雲BCC安裝BOS Python SDK--解決方法

今天在使用百度雲主機安裝百度物件儲存服務BOS提供的Python SDK時報錯,報錯截圖如下: 報錯資訊:ImportError: No module named Crypto.Cipher 經搜尋是由於缺少pycrypto模組導致的,解決方法:pip  instal