您尚未登录。

楼主 #1 2019-09-09 07:42:44

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

请问 pip install PyQt5 不成功, 这是什么错误?

     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 19kB/s eta 0
     |█████████████████████           | 32.7MB 19kB/s eta 0
     |█████████████████████           | 32.7MB 17kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 33.0MB 12kB/s eta 0
     |█████████████████████           | 33.0MB 10kB/s eta 0
     |█████████████████████           | 33.0MB 10kB/s eta 0
     |█████████████████████           | 33.0MB 7.9kB/s eta
     |█████████████████████           | 33.0MB 7.4kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 29kB/s eta 0
     |█████████████████████           | 33.1MB 29kB/s eta 0
     |█████████████████████           | 33.1MB 24kB/s eta 0
     |█████████████████████           | 33.1MB 24kB/s eta 0
     |█████████████████████▌          | 33.2MB 24kB/s eta
     |█████████████████████▌          | 33.2MB 24kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 21kB/s eta
     |█████████████████████▌          | 33.2MB 21kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 17kB/s eta
     |█████████████████████▌          | 33.3MB 17kB/s eta
     |█████████████████████▌          | 33.3MB 16kB/s eta
     |█████████████████████▌          | 33.3MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 15kB/s eta
     |█████████████████████▌          | 33.4MB 15kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 19kB/s eta
     |█████████████████████▌          | 33.5MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 15kB/s eta
     |█████████████████████▌          | 33.5MB 15kB/s eta
     |█████████████████████▌          | 33.6MB 15kB/s eta
     |█████████████████████▌          | 33.6MB 12kB/s eta
     |█████████████████████▌          | 33.6MB 12kB/s eta
     |█████████████████████▌          | 33.6MB 11kB/s eta
     |█████████████████████▌          | 33.6MB 11kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 10kB/s eta
     |█████████████████████▌          | 33.6MB 9.0kB/s eta
     |█████████████████████▌          | 33.7MB 9.0kB/s eta
     |█████████████████████▌          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 23kB/s eta
     |██████████████████████          | 33.7MB 23kB/s eta
     |██████████████████████          | 33.7MB 19kB/s eta
     |██████████████████████          | 33.7MB 19kB/s eta
     |██████████████████████          | 33.8MB 19kB/s eta
     |██████████████████████          | 33.8MB 19kB/s eta
     |██████████████████████          | 33.8MB 25kB/s eta
     |██████████████████████          | 33.8MB 25kB/s eta
     |██████████████████████          | 33.8MB 22kB/s eta
     |██████████████████████          | 33.8MB 16kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.9MB 18kB/s eta
     |██████████████████████          | 33.9MB 18kB/s eta
     |██████████████████████          | 33.9MB 16kB/s eta
     |██████████████████████          | 33.9MB 16kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 19kB/s eta
     |██████████████████████          | 33.9MB 19kB/s eta
     |██████████████████████          | 33.9MB 12kB/s eta
     |██████████████████████          | 34.0MB 12kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 17kB/s eta
     |██████████████████████          | 34.2MB 17kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 16kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 14kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 17kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 10kB/s eta
     |██████████████████████          | 34.3MB 10kB/s eta
     |██████████████████████          | 34.4MB 10kB/s eta
     |██████████████████████          | 34.4MB 10kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.5MB 23kB/s eta
     |██████████████████████          | 34.5MB 23kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 18kB/s eta
     |██████████████████████          | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 24kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
 0:15:54ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 397, in _error_catcher
    yield
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 479, in read
    data = self._fp.read(amt)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\http\client.p
y", line 457, in read
    n = self.readinto(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\http\client.p
y", line 501, in readinto
    n = self.fp.readinto(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\socket.py", l
ine 589, in readinto
    return self._sock.recv_into(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\ssl.py", line
 1071, in recv_into
    return self.read(nbytes, buffer)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\ssl.py", line
 929, 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 "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\commands\install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 307, in _get_abstract_dist_for
    self.require_hashes
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\operations\prepare.py", line 199, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 1064, in unpack_url
    progress_bar=progress_bar
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 924, in unpack_http_url
    progress_bar)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\utils\hashes.py", line 75, in check_against_chunks
    for chunk in chunks:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 829, in written_chunks
    for chunk in chunks:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\utils\ui.py", line 156, in iter
    for x in it:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 818, in resp_read
    decode_content=False):
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\contextlib.py
", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\users\xiaona\appdata\local\programs\python\python37\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.

离线

#2 2019-09-09 08:50:37

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

网速的问题?

离线

#3 2019-09-09 08:54:15

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

可能外网速度不行,或者文件没有下载完全,用豆瓣的仓库试一试:

pip install PyQt5   --trusted-host http://pypi.douban.com/simple/
pip install PyInstaller   --trusted-host http://pypi.douban.com/simple/

离线

楼主 #4 2019-09-09 09:01:12

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

谢谢楼上两位, 果然用豆瓣就搞定了。

离线

楼主 #5 2019-09-09 09:13:35

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

抄个PyQt 程序玩玩: https://build-system.fman.io/pyqt5-tutorial

from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout
app = QApplication([])
window = QWidget()
layout = QVBoxLayout()
layout.addWidget(QPushButton('Top'))
layout.addWidget(QPushButton('Bottom'))
window.setLayout(layout)
window.show()
app.exec_()

跑起来了:
2019-09-09_090254.png

离线

楼主 #6 2019-09-09 10:36:46

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

from PyQt5.QtWidgets import *

app = QApplication([])
button = QPushButton('Click')


def on_button_clicked():
    alert = QMessageBox()
    alert.setText('You clicked the button!')
    alert.exec_()
	
	
button.clicked.connect(on_button_clicked)

button.show()
app.exec_()

一个简单的 Qt5 信号槽程序

离线

楼主 #7 2019-09-09 11:11:26

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

Re: 请问 pip install PyQt5 不成功, 这是什么错误?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn