首页 技术 正文
技术 2022年11月8日
0 收藏 861 点赞 2,170 浏览 3259 个字

<!–
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c33720; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
–>

使用pip3 install scrapy命令之后,会出现如下问题:

Collecting scrapy

Downloading Scrapy-1.4.0-py2.py3-none-any.whl (248kB)

100% |████████████████████████████████| 256kB 1.2MB/s

Collecting PyDispatcher>=2.0.5 (from scrapy)

Downloading PyDispatcher-2.0.5.tar.gz

Collecting Twisted>=13.1.0 (from scrapy)

Downloading Twisted-17.9.0.tar.bz2 (3.0MB)

100% |████████████████████████████████| 3.0MB 323kB/s

Complete output from command python setup.py egg_info:

Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) — Some packages may not be found!

Couldn’t find index page for ‘incremental’ (maybe misspelled?)

Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) — Some packages may not be found!

No local packages or working download links found for incremental>=16.10.1

Traceback (most recent call last):

File “<string>”, line 1, in <module>

File “/private/var/folders/z5/9myf58gd0q5cj6hh8pnsfm800000gn/T/pip-build-do6a4sxu/Twisted/setup.py”, line 21, in <module>

setuptools.setup(**_setup[“getSetupArgs”]())

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py”, line 108, in setup

_setup_distribution = dist = klass(attrs)

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py”, line 315, in __init__

self.fetch_build_eggs(attrs[‘setup_requires’])

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py”, line 361, in fetch_build_eggs

replace_conflicting=True,

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 850, in resolve

dist = best[req.key] = env.best_match(req, ws, installer)

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 1122, in best_match

return self.obtain(req, installer)

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py”, line 1134, in obtain

return installer(requirement)

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py”, line 429, in fetch_build_egg

return cmd.easy_install(req)

File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py”, line 659, in easy_install

raise DistutilsError(msg)

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

—————————————-

Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/z5/9myf58gd0q5cj6hh8pnsfm800000gn/T/pip-build-do6a4sxu/Twisted/

以上原因主要是由于证书问题导致的,解决办法如下:

$ wget http://curl.haxx.se/ca/cacert.pem

$ mv cacert.pem ca-bundle.crt

$ sudo cp ca-bundle.crt /etc/pki/tls/certs/

注意:在/etc 下,可能并没有/pki/tls/certs/等目录,此时需要手动创建

cd /etc

sudo mkdir pki

cd pki

sudo mkdir tls

cd tls

sudo mkdir certs

返回含有ca-bundle.crt文件的目录,重新执行 $ sudo cp ca-bundle.crt /etc/pki/tls/certs/

然后执行 命令 pip3 install scrapy

安装完成

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,493
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,295