鱼C论坛

 找回密码
 立即注册
查看: 1411|回复: 11

【求助】安装scrapy遇到的问题

[复制链接]
发表于 2020-8-12 19:30:45 | 显示全部楼层 |阅读模式

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

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

x
C:\Users\二农戏猪>pip install scrapy
Collecting scrapy
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/scrapy/
  Downloading https://files.pythonhosted.org/p ... y2.py3-none-any.whl (237kB)
     |████████████████████████████████| 245kB 4.0kB/s
Collecting itemadapter>=0.1.0 (from scrapy)
  Downloading https://files.pythonhosted.org/p ... .0-py3-none-any.whl
Collecting cssselect>=0.9.1 (from scrapy)
  Downloading https://files.pythonhosted.org/p ... y2.py3-none-any.whl
Collecting lxml>=3.5.0 (from scrapy)
  Downloading https://files.pythonhosted.org/p ... cp38-cp38-win32.whl (3.2MB)
     |▌                               | 61kB 6.3kB/s eta 0:08:23ERROR: Exception:
Traceback (most recent call last):
  File "d:\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 397, in _error_catcher
    yield
  File "d:\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 479, in read
    data = self._fp.read(amt)
  File "d:\python\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "d:\python\lib\http\client.py", line 454, in read
    n = self.readinto(b)
  File "d:\python\lib\http\client.py", line 498, in readinto
    n = self.fp.readinto(b)
  File "d:\python\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "d:\python\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "d:\python\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\python\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "d:\python\lib\site-packages\pip\_internal\commands\install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "d:\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "d:\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "d:\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 305, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(
  File "d:\python\lib\site-packages\pip\_internal\operations\prepare.py", line 195, in prepare_linked_requirement
    unpack_url(
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 1058, in unpack_url
    unpack_http_url(
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 920, in unpack_http_url
    from_path, content_type = _download_http_url(link,
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "d:\python\lib\site-packages\pip\_internal\utils\hashes.py", line 75, in check_against_chunks
    for chunk in chunks:
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 829, in written_chunks
    for chunk in chunks:
  File "d:\python\lib\site-packages\pip\_internal\utils\ui.py", line 156, in iter
    for x in it:
  File "d:\python\lib\site-packages\pip\_internal\download.py", line 794, in resp_read
    for chunk in resp.raw.stream(
  File "d:\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "d:\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "d:\python\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "d:\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 402, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.




这是什么问题啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-8-12 21:14:21 | 显示全部楼层
pip install -i  scarpy  https://pypi.tuna.tsinghua.edu.cn/simple
试试这样
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-12 21:29:47 | 显示全部楼层

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

使用道具 举报

发表于 2020-8-12 21:30:06 | 显示全部楼层
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-12 21:31:16 | 显示全部楼层

C:\Users\二农戏猪>pip install -i  scarpy  https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: scarpy
Collecting https://pypi.tuna.tsinghua.edu.cn/simple
  Downloading https://pypi.tuna.tsinghua.edu.cn/simple (13.0MB)
     |████████████████████████████████| 13.0MB 656kB/s
  ERROR: Cannot unpack file C:\Users\二农戏猪\AppData\Local\Temp\pip-unpack-wlzthn76\simple.html (downloaded from C:\Users\二农戏猪\AppData\Local\Temp\pip-req-build-230tm2ey, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\二农戏猪\AppData\Local\Temp\pip-req-build-230tm2ey
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
是这样
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-12 21:32:10 | 显示全部楼层
C:\Users\二农戏猪>pip install -i  scarpy  https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: scarpy
Collecting https://pypi.tuna.tsinghua.edu.cn/simple
  Downloading https://pypi.tuna.tsinghua.edu.cn/simple (13.0MB)
     |████████████████████████████████| 13.0MB 656kB/s
  ERROR: Cannot unpack file C:\Users\二农戏猪\AppData\Local\Temp\pip-unpack-wlzthn76\simple.html (downloaded from C:\Users\二农戏猪\AppData\Local\Temp\pip-req-build-230tm2ey, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\二农戏猪\AppData\Local\Temp\pip-req-build-230tm2ey
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-12 21:43:17 | 显示全部楼层
二农戏猪` 发表于 2020-8-12 21:32
C:%users\二农戏猪>pip install -i  scarpy  https://pypi.tuna.tsinghua.edu.cn/simple
Lookin ...
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn scarpy
cmd里输入这个
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-12 21:51:02 | 显示全部楼层

C:\Users\二农戏猪>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn scarpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting scarpy
  Downloading https://pypi.tuna.tsinghua.edu.c ... rpy-1000.0.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'd:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\二农戏猪\\AppData\\Local\\Temp\\pip-install-0s03yc4d\\scarpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\二农戏猪\\AppData\\Local\\Temp\\pip-install-0s03yc4d\\scarpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\二农戏猪\AppData\Local\Temp\pip-install-0s03yc4d\scarpy\
    Complete output (8 lines):
    running egg_info
    creating pip-egg-info\python_dateutiil.egg-info
    writing pip-egg-info\python_dateutiil.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\python_dateutiil.egg-info\dependency_links.txt
    writing requirements to pip-egg-info\python_dateutiil.egg-info\requires.txt
    writing top-level names to pip-egg-info\python_dateutiil.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\python_dateutiil.egg-info\SOURCES.txt'
    error: package directory 'python-dateutiil' does not exist
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\二农戏猪>

还是不行, 显示这个
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-13 07:31:13 | 显示全部楼层
二农戏猪` 发表于 2020-8-12 21:51
C:%users\二农戏猪>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna ...
pip install --upgrade setuptools
更新一下seruptools试试
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-13 11:34:11 | 显示全部楼层
1q23w31 发表于 2020-8-13 07:31
更新一下seruptools试试

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

使用道具 举报

发表于 2020-8-13 12:30:23 | 显示全部楼层

在cmd里输入
pip install --upgrade setuptools
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-8-13 13:29:09 | 显示全部楼层

C:\Users\二农戏猪>pip install --upgrade setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/p ... .2-py3-none-any.whl (790kB)
     |████████████████████████████████| 798kB 60kB/s
Installing collected packages: setuptools
  Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
      Successfully uninstalled setuptools-41.2.0
Successfully installed setuptools-49.3.2
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-19 11:15

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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