Centos安装pycurl

centos 安装pycurl
yum install python-devel curl-devel
pip3 install pycurl

Mac(老版本)安装pycurl

解决MacOS升级后出现xcrun: error: invalid active developer path, missing xcrun的问题

xcode-select --install
然后
dongchang-:qqmusic baoshan$ pip3 install pycurl
Collecting pycurl
Using cached pycurl-7.43.0.1.tar.gz
Building wheels for collected packages: pycurl
Running setup.py bdist_wheel for pycurl ... done
Stored in directory: /Users/baoshan/Library/Caches/pip/wheels/a5/5b/c8/f80900b09b49815e1f90dbae2f57e49b3f4c61071db40fb238
Successfully built pycurl
Installing collected packages: pycurl
Successfully installed pycurl-7.43.0.1 ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
解决办法
# pip uninstall pycurl
# export PYCURL_SSL_LIBRARY=openssl
# pip install pycurl dongchang-:qqmusic baoshan$ pip3 install pycurl
Collecting pycurl
Installing collected packages: pycurl
Successfully installed pycurl-7.43.0.1 上述参考自:http://www.kxtry.com/archives/398 dongchang-:include baoshan$ python3
Python 3.5. (v3.5.2:4def2a2901a5, Jun , ::)
[GCC 4.2. (Apple Inc. build ) (dot )] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line , in <module>
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) 参考解决方案:https://www.jianshu.com/p/50b6771eb853

新版本Mac安装pycurl

但是这里有一个坑:在高版本的mac系统环境变量里是找不到openssl的头文件的
因为新版本Mac的openssl版本 LibreSSL 2.2.7
pip3 uninstall pycurl# 卸载库
export PYCURL_SSL_LIBRARY
=openssl
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include# openssl相关头文件路径
pip3 install pycurl --compile --no-cache-dir
# 重新编译安装 至此终于搞定。
dongchang-5:pycurl-7.43.0 baoshan$ python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
>>>

参考:https://segmentfault.com/q/1010000012674778

搞了一个多下午,终于找到解决办法。。。

Python安装pycurl失败,及解决办法的更多相关文章

  1. npm install 错误 安装 chromedriver 失败的解决办法

    npm 安装 chromedriver 失败的解决办法npm 安装 chromedriver 时,偶尔会出错,错误提示类似于:npm ERR! chromedriver@2.35.0 install: ...

  2. 转:阿里旺旺导致python安装包失败的解决办法

    我以前使用web.py没事,今天运行时报错, mimetypes.init() # try to read system mime.types File "D:\ProgramFiles\p ...

  3. Linux安装vim失败的解决办法

    最近想了解一下linux编程,于是linux系统下输入vim,发现竟然没有安装.好吧,那就安装吧.命令: sudo apt-get install vim 百度百科:apt-get是一条linux命令 ...

  4. vs2010用NuGet(程序包管理)安装EF失败之解决办法

    今天用程序包管理控制台安装EF.报错.如下

  5. Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法

    1.安装步骤: 首先,你要先进入pycharm的Project Interpreter界面,进入方法是:setting(ctrl+alt+s) ->Project Interpreter,Pro ...

  6. [转]Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法

    原文地址:https://www.cnblogs.com/yysbolg/p/9040649.html 刚开始学习一门技术最麻烦的问题就是搞定IDE环境,直接在PyCharm里安装BeautifulS ...

  7. Eclipse安装PyDev失败的解决办法

    在Eclipse上安装Pydev,首先尝试了三种方法,均失败. Eclipse版本号如下: 尝试的方法 第一种: 菜单栏Help>Install New Software,输入网址, http: ...

  8. npm 安装 sass-loader 失败的解决办法

    You got to add python to your PATH variable. One thing you can do is Edit your Path variable now and ...

  9. PandorBox 中安装aria2失败的解决办法

    来自:http://www.right.com.cn/forum/thread-174358-1-1.html 不论luci界面还是opkg中安装,都提示缺少依赖包uclibc,pandorabox默 ...

随机推荐

  1. 【LeetCode】213. House Robber II

    House Robber II Note: This is an extension of House Robber. After robbing those houses on that stree ...

  2. memcached内存管理机制[未整理]

    memcached默认采用的是Slab Allocator的机制分配管理内存的,在此之前,内存的分配是通过对所有的记录简单地进行malloc和free来进行的,但这种方式容易造成很多内存碎片,加重操作 ...

  3. POJ 3678 Katu Puzzle (经典2-Sat)

    Katu Puzzle Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6553   Accepted: 2401 Descr ...

  4. k8s实战读书笔记

    一.概述 kubernetes中Service是真实应用的抽象,将用来代理Pod,对外提供固定IP作为访问入口,这样通过访问Service便能访问到相应的Pod,而对访问者来说只需知道Service的 ...

  5. 【Java】详解菜单组件

    在这篇文章中,笔者会介绍Java图形界面编程中菜单组件的用法.关于菜单组件,因为java存在AWT编程和Swing编程,所以菜单组件也存在AWT菜单和Swing菜单.因为Swing组件使用的比较多,所 ...

  6. CheckStyle检查规则中文翻译

    本文主要介绍CheckStyle 的各个规则配置项目,这个版本的CheckStyle将样式规则分为了以下十六种类型共138条规则: 官方文档地址:http://checkstyle.sourcefor ...

  7. Docker未启动错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    此问题是因为Docker安装后未启动所致,执行以下命令启动docker: systemctl start docker.service 具体日志如下: Connecting to ... Connec ...

  8. Debian 8 设置时区和时间配置

    一.设置时区 1. 执行 tzselect 2. 弹出洲级地域选项: Please identify a location so that time zone rules can be set cor ...

  9. Linux下多路复用IO接口epoll/select/poll的区别

    select比epoll效率差的原因:select是轮询,epoll是触发式的,所以效率高. Select: 1.Socket数量限制:该模式可操作的Socket数由FD_SETSIZE决定,内核默认 ...

  10. 使用 properties 配置文件装配 bean 的方式

    在spring中将bean 注册到spring 容器中常见的有三种方式(两类): 先说明配置文件内容:application.yml,有一段配置如下 persons: youtube: name: y ...