鱼C论坛

 找回密码
 立即注册
查看: 1321|回复: 6

SCRAPY现在支持python3.X了?

[复制链接]
发表于 2022-5-6 14:04:50 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
有知道的大神出来说说
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-5-6 14:16:45 | 显示全部楼层
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-5-6 14:44:36 | 显示全部楼层
Twilight6 发表于 2022-5-6 14:16
2016 左右应该就支持了:

https://www.zyte.com/blog/python-3-support-with-scrapy-1/

谢谢!网站好像没看到最高支持python3.几
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-5-6 14:52:36 | 显示全部楼层
Twilight6 发表于 2022-5-6 14:16
2016 左右应该就支持了:

https://www.zyte.com/blog/python-3-support-with-scrapy-1/


刚才通过python -m pip install scrapy命令安装scrapy,结果返回如下一大串:

Collecting scrapy
  Downloading Scrapy-2.6.1-py2.py3-none-any.whl (264 kB)
     ---------------------------------------- 264.3/264.3 KB 219.8 kB/s eta 0:00:00
Collecting w3lib>=1.17.0
  Downloading w3lib-1.22.0-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: setuptools in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from scrapy) (60.9.3)
Collecting parsel>=1.5.0
  Downloading parsel-1.6.0-py2.py3-none-any.whl (13 kB)
Collecting protego>=0.1.15
  Downloading Protego-0.2.1-py2.py3-none-any.whl (8.2 kB)
Requirement already satisfied: lxml>=3.5.0 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from scrapy) (4.8.0)
Requirement already satisfied: zope.interface>=4.1.3 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from scrapy) (5.4.0)
Requirement already satisfied: cryptography>=2.0 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from scrapy) (3.2)
Collecting PyDispatcher>=2.0.5
  Downloading PyDispatcher-2.0.5.zip (47 kB)
     ---------------------------------------- 47.6/47.6 KB 266.5 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting itemloaders>=1.0.1
  Downloading itemloaders-1.0.4-py3-none-any.whl (11 kB)
Collecting cssselect>=0.9.1
  Downloading cssselect-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting service-identity>=16.0.0
  Downloading service_identity-21.1.0-py2.py3-none-any.whl (12 kB)
Collecting queuelib>=1.4.2
  Downloading queuelib-1.6.2-py2.py3-none-any.whl (13 kB)
Collecting Twisted>=17.9.0
  Downloading Twisted-22.4.0-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 114.8 kB/s eta 0:00:00
Collecting itemadapter>=0.1.0
  Downloading itemadapter-0.5.0-py3-none-any.whl (10 kB)
Collecting tldextract
  Downloading tldextract-3.3.0-py3-none-any.whl (93 kB)
     ---------------------------------------- 93.6/93.6 KB 95.2 kB/s eta 0:00:00
Collecting pyOpenSSL>=16.2.0
  Downloading pyOpenSSL-22.0.0-py2.py3-none-any.whl (55 kB)
     ---------------------------------------- 55.8/55.8 KB 121.6 kB/s eta 0:00:00
Requirement already satisfied: six>=1.4.1 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from cryptography>=2.0->scrapy) (1.16.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from cryptography>=2.0->scrapy) (1.15.0)
Requirement already satisfied: jmespath>=0.9.5 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from itemloaders>=1.0.1->scrapy) (1.0.0)
Collecting cryptography>=2.0
  Downloading cryptography-37.0.2-cp36-abi3-win_amd64.whl (2.4 MB)
     ---------------------------------------- 2.4/2.4 MB 101.0 kB/s eta 0:00:00
Requirement already satisfied: attrs>=19.1.0 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from service-identity>=16.0.0->scrapy) (19.3.0)
Requirement already satisfied: pyasn1-modules in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from service-identity>=16.0.0->scrapy) (0.2.8)
Requirement already satisfied: pyasn1 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from service-identity>=16.0.0->scrapy) (0.4.8)
Collecting hyperlink>=17.1.1
  Downloading hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
     ---------------------------------------- 74.6/74.6 KB 164.7 kB/s eta 0:00:00
Collecting Automat>=0.8.0
  Downloading Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting constantly>=15.1
  Downloading constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting incremental>=21.3.0
  Downloading incremental-21.3.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: typing-extensions>=3.6.5 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from Twisted>=17.9.0->scrapy) (4.1.1)
Collecting twisted-iocpsupport<2,>=1.0.2
  Downloading twisted_iocpsupport-1.0.2-cp37-cp37m-win_amd64.whl (44 kB)
     ---------------------------------------- 44.7/44.7 KB 169.8 kB/s eta 0:00:00
Requirement already satisfied: idna in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from tldextract->scrapy) (2.10)
Requirement already satisfied: requests>=2.1.0 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from tldextract->scrapy) (2.25.0)
Requirement already satisfied: filelock>=3.0.8 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from tldextract->scrapy) (3.6.0)
Collecting requests-file>=1.4
  Downloading requests_file-1.5.1-py2.py3-none-any.whl (3.7 kB)
Requirement already satisfied: pycparser in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.0->scrapy) (2.21)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from requests>=2.1.0->tldextract->scrapy) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from requests>=2.1.0->tldextract->scrapy) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\dell\appdata\local\programs\python\python37\lib\site-packages (from requests>=2.1.0->tldextract->scrapy) (1.26.6)
Building wheels for collected packages: PyDispatcher
  Building wheel for PyDispatcher (setup.py) ... done
  Created wheel for PyDispatcher: filename=PyDispatcher-2.0.5-py3-none-any.whl size=12560 sha256=a78cafc863dbbd8a49bbcea4959d94441676c15299bc80b5ba162f96542a1524
  Stored in directory: c:\users\dell\appdata\local\pip\cache\wheels\2d\18\21\3c6a732eaa69a339198e08bb63b7da2c45933a3428b29ec454
Successfully built PyDispatcher
Installing collected packages: twisted-iocpsupport, PyDispatcher, incremental, constantly, w3lib, queuelib, protego, itemadapter, hyperlink, cssselect, Automat, Twisted, requests-file, parsel, cryptography, tldextract, service-identity, pyOpenSSL, itemloaders, scrapy
  Attempting uninstall: cryptography
    Found existing installation: cryptography 3.2
    Uninstalling cryptography-3.2:
      Successfully uninstalled cryptography-3.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
homeassistant 2021.1.5 requires cryptography==3.2, but you have cryptography 37.0.2 which is incompatible.
homeassistant 2021.1.5 requires importlib-metadata==1.6.0; python_version < "3.8", but you have importlib-metadata 4.11.3 which is incompatible.
homeassistant 2021.1.5 requires pip<20.3,>=8.0.3, but you have pip 22.0.4 which is incompatible.

Successfully installed Automat-20.2.0 PyDispatcher-2.0.5 Twisted-22.4.0 constantly-15.1.0 cryptography-37.0.2 cssselect-1.1.0 hyperlink-21.0.0 incremental-21.3.0 itemadapter-0.5.0 itemloaders-1.0.4 parsel-1.6.0 protego-0.2.1 pyOpenSSL-22.0.0 queuelib-1.6.2 requests-file-1.5.1 scrapy-2.6.1 service-identity-21.1.0 tldextract-3.3.0 twisted-iocpsupport-1.0.2 w3lib-1.22.0

C:\Users\dell>

红色字体部分好像提示的是错误

到底scrapy有没有安装成功啊???求大神指点
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-5-6 14:54:42 | 显示全部楼层
lzb1001 发表于 2022-5-6 14:52
刚才通过python -m pip install scrapy命令安装scrapy,结果返回如下一大串:

Collecting scrapy

scapy 安装成功了,报错的地方是你存在了这些依赖库,

而这些依赖库不是 scapy 所需要的版本
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-5-6 14:56:13 | 显示全部楼层
lzb1001 发表于 2022-5-6 14:52
刚才通过python -m pip install scrapy命令安装scrapy,结果返回如下一大串:

Collecting scrapy



出现 Successfully 就是安装成功了,红字报错应该是有些包不太兼容吧

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-5-6 17:33:43 | 显示全部楼层
和homeassistant这个包的依赖有冲突,homeassistant这个包的依赖有点旧,如果冲突造成homeassistant不能正常使用就先更新一下它吧,最新22.5.1
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-18 10:48

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表