python curl模块在windows_Python-pycurl模块的安装

先执行以下命令(因为我在另一个终端执行,所以history的编号有重复)

7 wget https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz --no-check-

8 tar -zxvf pycurl-7.19.3.1.tar.gz

9 cd pycurl-7.19.3.1/

10 ls

11 yum install python-devel gcc* libcurl-devel openssl-libs-1.0.2k-8.el7.x86_64 -y

12 kill -9 3688        #因为我yum被锁了

13 yum install python-devel gcc* libcurl-devel openssl-libs-1.0.2k-8.el7.x86_64 -y

[root@localhost pycurl-7.19.3.1]# history

1 ifconfig

2 ping www.baidu.com

3 ifconfig|grep 'inet '

4 systemctl restart network

5 ifconfig|grep 'inet '

6 ping 10.0.3.14

7 wget http://curl.haxx.se/download/curl-7.36.0.tar.gz

8 tar -zxvf curl-7.36.0.tar.gz

9 cd curl-7.36.0/

10 ls

11 ./configure

12 make && make install

13 export LD_LIBRARY_PATH=/usr/local/lib     #这里也是关键,否则会报错ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)  注意export,也就是说只能在当前终端有效,另开一个终端会失效

14 cd ..

15 cd pycurl-7.19.3.1/

16 ls

17 python setup.py install --curl-config=/usr/local/bin/curl-config

[root@localhost pycurl-7.19.3.1]# python

Python 2.7.5 (default, Aug 4 2017, 00:39:18)

[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import pycurl

>>> quit()

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值