笔者在win10的cmd命令行中使用如下命令产生了一系列的问题
pip install pyinstaller
经过一系列的折腾,最终成功解决,下面分享一下个人遇见的问题以及解决的方法
问题1:ssl module in Python is not available.
笔者在python3中import ssl
未出现任何错误,但是在cmd中却出现ssl不可访问的问题;(很奇怪+1)
解决方法:在http://slproweb.com/products/Win32OpenSSL.html中,重新下载ssl并安装;
另外,import ssl
出现ssl缺失情况的朋友也可以尝试手动下载ssl并安装的方法;
问题2:‘pip’ 不是内部或外部命令,也不是可运行的程序
在成功安装ssl之后,运行pip install pyinstaller
又遇到了不认识pip
命令的问题;
**解决方法:**在系统环境变量中加入python文件夹下的Scripts文件夹
问题3:The handshake operation timed out
接着运行pip install pyinstaller
,又出现了
WARNING:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pyinstaller/
百度一番后网友们的看法是,连接不到国外的服务器,可是笔者自己已经打开了vpn,还是出现这种情况;(很奇怪+2)
解决方法(换源+信任主机):
pip install pyinstaller -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
其中pyinstaller是笔者自己需要安装的东西,大家可以根据自己的需要进行更改