centos7 安装 pyspider 出现的一系列问题及解决方案集合
先安装python3 和 pip3
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
安装zlib-devel包(后面安装pip需要用到,这里先下载,后面就不用重复编译)
yum install zlib-devel
tar -xvf Python-3.6.5.tgz
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
./configure --prefix=/usr/local/python3/ --with-zlib=/usr/include --enable-loadable-sqlite-extensions
make && make install
ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
pip3 安装
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
tar -zxvf pip-8.0.2.tar.gz
cd pip-8.0.2
sudo python3 setup.py build
sudo python3 setup.py install
sudo ln -s /usr/local/python3.4/bin/pip3 /usr/bin/pip3
出现的错误
Collecting pycurl (from pyspider)
Downloading https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz (214kB)
100% |████████████████████████████████| 217kB 172kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/tmp/pip-build-ffrwekm7/pycurl/setup.py", line 223, in configure_unix
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/local/python3/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/python3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ffrwekm7/pycurl/setup.py", line 913, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/tmp/pip-build-ffrwekm7/pycurl/setup.py", line 582, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/tmp/pip-build-ffrwekm7/pycurl/setup.py", line 99, in __init__
self.configure()
File "/tmp/pip-build-ffrwekm7/pycurl/setup.py", line 227, in configure_unix
raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
在安装 pyspider 的时候我就遇到了这个问题, pyspider 依赖 pycurl 这个库,而 pycurl 要求系统中存在相对应的库。(如果系统自动安装我们要先卸载)
Collecting pycurl
Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Complete output from command python setup.py egg_info:
Using curl-config (libcurl 7.29.0)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-5y2xk7rz/pycurl/setup.py", line 913, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/tmp/pip-install-5y2xk7rz/pycurl/setup.py", line 582, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/tmp/pip-install-5y2xk7rz/pycurl/setup.py", line 99, in __init__
self.configure()
File "/tmp/pip-install-5y2xk7rz/pycurl/setup.py", line 316, in configure_unix
specify the SSL backend manually.''')
__main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
---------------------------------------------------------------------
pip remove pycurl
`yum install libcurl-devel`
export PYCURL_SSL_LIBRARY=openssl >> ~/.bashrc
source ~/.bashrc
pip3 install pycurl
--------------------------------------------------------------------------
ubuntu的方案
sudo apt-get install libssl-dev libcurl4-openssl-dev python-dev
pip3 install pyspider
引用页面
https://blog.csdn.net/blueheart20/article/details/81626516
https://github.com/binux/pyspider
http://www.cnblogs.com/yunlongaimeng/p/9947228.html
centos7 安装 pyspider 出现的一系列问题及解决方案集合的更多相关文章
- Centos7安装jexus,部署asp.net core,asp.net mvc
什么是Jexus 官网解释:https://www.jexus.org/ Jexus是一款Linux平台上的高性能WEB服务器和负载均衡网关,Jexus Web Service,简称JWS,以支持AS ...
- centos7安装手册
一:centos7下载 下载centos可以访问阿里云完成centos 7.7下载(建议使用迅雷下载):http://mirrors.aliyun.com/centos/7.9.2009/isos/x ...
- HP服务器 hp 360g5 centos7安装问题
HP服务器 hp 360g5 centos7安装问题 一 :启动盘无法识别硬盘 1.进入安装光盘,用上下键选择安装centos--Install Centos7(注意不可按Enter键),如图: 2 ...
- CentOS7 安装Mono及Jexus
CentOS7安装Mono及Juxes 1 安装Mono 1.1 安装yum-utils 因为安装要用到yum-config-manager,默认是没有安装的,所以要先安装yum-utils包.命令如 ...
- CentOS7安装mysql提示“No package mysql-server available.”
针对centos7安装mysql,提示"No package mysql-server available."错误,解决方法如下: Centos 7 comes with Mari ...
- CentOS7安装Oracle 11gR2 安装
概述 Oracle 在Linux和window上的安装不太一样,公司又是Linux系统上的Oracle,实在没辙,研究下Linux下Oracle的使用,oracle默认不支持CentOS系统安装,所以 ...
- Centos7安装完毕后重启提示Initial setup of CentOS Linux 7 (core)的解决方法
问题: CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core) 1) [x] Creat user 2) [!] License i ...
- centos7安装eclipse
centos7安装eclipse Eclipse是一个集成开发环境(IDE),包含一个基工作区和定制环境的可扩展插件系统.大部分使用 Java 编写,Eclipse 可以用来开发应用程序.通过各种插件 ...
- CentOS7安装mongoDB数据库
CentOS7安装mongoDB数据库 时间:2015-03-03 16:45来源:blog.csdn.net 作者:进击的木偶 举报 点击:8795次 mongoDB是目前发展比较好的NOSQL数据 ...
随机推荐
- LeetCode算法题-Prime Number of Set Bits in Binary Representation(Java实现)
这是悦乐书的第311次更新,第332篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第180题(顺位题号是762).给定两个正整数L和R,在[L,R]范围内,计算每个整数的 ...
- 数据库【mongodb】之pymongo
一个Python操作mongodb的模块 # coding=utf-8 from pymongo import MongoClient #实例化client,建立连接 client = MongoCl ...
- 数据库MySQL(课下作业)
一.作业要求 下载附件中的world.sql.zip, 参考http://www.cnblogs.com/rocedu/p/6371315.html#SECDB,导入world.sql,提交导入成功截 ...
- Swagger使用指南
1:认识Swagger Swagger 是一个规范和完整的框架,用于生成.描述.调用和可视化 RESTful 风格的 Web 服务.总体目标是使客户端和文件系统作为服务器以同样的速度来更新.文件的方法 ...
- mysql的学习笔记(三)
1.外键约束(保持数据一致,完整.实现一对多或一对一) 父表(参照的表)和子表(有外键列的表)必须使用相同的存储引擎InnoDB,禁止使用临时表. 外键列和参照列必须具有相似的数据类型.其中数字的长度 ...
- 为什么有那么多人愿意喝"鸡汤"?
什么是心灵鸡汤 心灵鸡汤,就是“充满知识与感情的话语”,柔软.温暖,充满正能量.心灵鸡汤是一种安慰剂,可以怡情,作阅读快餐:亦可移情,挫折.抑郁时,疗效直逼“打鸡血”.这也是“心灵鸡汤”风靡不衰的原因 ...
- Redis协议规范(RESP)
Redis 即 REmote Dictionary Server (远程字典服务): 而Redis的协议规范是 Redis Serialization Protocol (Redis序列化协议) 该协 ...
- Java中实现多线程的四种方式
Java多线程实现方式主要有四种:继承Thread类.实现Runnable接口.实现Callable接口通过FutureTask包装器来创建Thread线程.使用ExecutorService.Cal ...
- [Nodejs] node写个hello,world
http 模块 与 hello world hello world let http = require("http"); http .createServer((request, ...
- 持续交付之软件包管理maven篇
背景 持续交付的我们常见的流程如下,其中有一个环节就是软件包管理 今天我们以maven仓库为示例,如下是Jenkins与CD生态: 持续交付的示例 5 Principles 五个原则 Deliver ...