乌班图pycharm安装pygame报错?求助
Executed command:pip install pygame
Executed occurred:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
Proposed solution:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '/home/linux89757/飞机大战/bin/python'.
Command output:
Collecting pygame
Downloading https://files.pythonhosted.org/packages/1d/c2/9a27669dc9f25978d70593d62405cf883b62cedf631ca996a10673000ab1/pygame-1.9.6-cp35-cp35m-manylinux1_x86_64.whl (11.4MB)
Exception:
Traceback (most recent call last):
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/urllib3/response.py", line 360, in _error_catcher
yield
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/urllib3/response.py", line 442, in read
data = self._fp.read(amt)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.5/http/client.py", line 458, in read
n = self.readinto(b)
File "/usr/lib/python3.5/http/client.py", line 498, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 575, in read
v = 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 "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/cli/base_command.py", line 179, in main
status = self.run(options, args)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/commands/install.py", line 315, in run
resolver.resolve(requirement_set)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/operations/prepare.py", line 334, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 878, in unpack_url
progress_bar=progress_bar
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 702, in unpack_http_url
progress_bar)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 946, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 639, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/utils/hashes.py", line 62, in check_against_chunks
for chunk in chunks:
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 607, in written_chunks
for chunk in chunks:
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_internal/download.py", line 596, in resp_read
decode_content=False):
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/urllib3/response.py", line 494, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/urllib3/response.py", line 459, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/linux89757/飞机大战/lib/python3.5/site-packages/pip-19.0.3-py3.5.egg/pip/_vendor/urllib3/response.py", line 365, 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.
没有将Ubuntu的默认更新源更改为中国的镜像源,连接超时 某某某丨屮 发表于 2019-10-8 14:23
没有将Ubuntu的默认更新源更改为中国的镜像源,连接超时
改了,试了阿里云、清华和搜狐都不行 某某某丨屮 发表于 2019-10-8 14:23
没有将Ubuntu的默认更新源更改为中国的镜像源,连接超时
网上说改连接时间超时为1000秒的方法也试过,但还是不行。
之前一直用搜狐镜像源从终端安装pygame也可以,但是很慢;到在pycharm上安装就装不了了 额~~
改成东软的源就好了~~
可以再试一试
页:
[1]