最终解决办法
指定 pip 源为国内镜像
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
实际安装过程
首先是参考了官方安装教程, 但是执行了几次都失败了,要么下载过程中断,要么安装过程依赖出现了问题;然后参考了几篇博客,统一的说法是手动下载安装包,然后解压到本地,手动安装。
最终结果仍然是失败,只能说这些方法对我不管用。 下面会贴出详细步骤:
一、官方安装教程
pip install pyinstaller
执行结果如下:
反复执行的结果,就是如下两种情况。
效果图 1
Collecting pyinstaller
Downloading https://files.pythonhosted.org/packages/3c/c9/c3f9bc64eb11eee6a824686deba6129884c8cbdf70e750661773b9865ee0/PyInstaller-3.6.tar.gz (3.5MB)
|▌ | 61kB 4.6kB/s eta 0:12:35ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 457, in read
n = self.readinto(b)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 501, in readinto
n = self.fp.readinto(b)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
Fil