【求助】安装scrapy遇到的问题
C:\Users\二农戏猪>pip install scrapyCollecting 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/packages/58/59/a942878de3fb03481207a32bea488d7c3bd6bd8deecdbf90b6746dfa2da0/Scrapy-2.3.0-py2.py3-none-any.whl (237kB)
|████████████████████████████████| 245kB 4.0kB/s
Collecting itemadapter>=0.1.0 (from scrapy)
Downloading https://files.pythonhosted.org/packages/7d/fb/92f848fcfa85dc9f95370eaecb5c99b5230dd4fc5c6bae684f4ca59df973/itemadapter-0.1.0-py3-none-any.whl
Collecting cssselect>=0.9.1 (from scrapy)
Downloading https://files.pythonhosted.org/packages/3b/d4/3b5c17f00cce85b9a1e6f91096e1cc8e8ede2e1be8e96b87ce1ed09e92c5/cssselect-1.1.0-py2.py3-none-any.whl
Collecting lxml>=3.5.0 (from scrapy)
Downloading https://files.pythonhosted.org/packages/0a/be/c739cc86c76f7bf190af126737f0e664b2b719337b046368301cc778db06/lxml-4.5.2-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.
这是什么问题啊 pip install -iscarpyhttps://pypi.tuna.tsinghua.edu.cn/simple
试试这样 1q23w31 发表于 2020-8-12 21:14
试试这样
cmd运行么? 二农戏猪` 发表于 2020-8-12 21:29
cmd运行么?
对cmd 1q23w31 发表于 2020-8-12 21:30
对cmd
C:\Users\二农戏猪>pip install -iscarpyhttps://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.
是这样 {:10_249:}C:\Users\二农戏猪>pip install -iscarpyhttps://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.
二农戏猪` 发表于 2020-8-12 21:32
C:%users\二农戏猪>pip install -iscarpyhttps://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里输入这个 1q23w31 发表于 2020-8-12 21:43
cmd里输入这个
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.cn/packages/69/9a/fe110e334223e434d9eaa1e87a222c89e49f6406363248674690603ef9c0/scarpy-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 = '"'"'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\二农戏猪>
还是不行, 显示这个 二农戏猪` 发表于 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试试{:9_219:} 1q23w31 发表于 2020-8-13 07:31
更新一下seruptools试试
怎么更新啊 二农戏猪` 发表于 2020-8-13 11:34
怎么更新啊
在cmd里输入pip install --upgrade setuptools 1q23w31 发表于 2020-8-13 12:30
在cmd里输入
C:\Users\二农戏猪>pip install --upgrade setuptools
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/fd/36/9fdefefb11902ca987dbd92c0fe869ed5e2a798822bb4cea843b2a8f7571/setuptools-49.3.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{:5_104:}
页:
[1]