python封装pyinstaller老是出现问题,别人的封装没问题。

File "D:\Program\Anaconda3\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 90, in exec_statement
return __exec_python_cmd(cmd)
File "D:\Program\Anaconda3\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 77, in __exec_python_cmd
txt = exec_python(*cmd, env=pp_env)
File "D:\Program\Anaconda3\lib\site-packages\PyInstaller\compat.py", line 562, in exec_python
return exec_command(*cmdargs, **kwargs)
File "D:\Program\Anaconda3\lib\site-packages\PyInstaller\compat.py", line 369, in exec_command
out = out.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 118: invalid continuation byte

Process finished with exit code 1

方法一:直接使用pip,国内网络会无法连接

1

pip install pyinstaller

方法二:下载源码安装

在github中打包下载,解压到电脑中,运行命令行进入此目录。

12345678910111213

//进入子目录 bootloadercd bootloader //build the bootloader 运行python ./waf configure build install //重新进入根目录cd .. //安装pyinstallerpython setup.py install //from http://www.cnblogs.com/osfipin/

查看安装结果,运行命令:

pyinstaller --version

说明安装成功。

温馨提示:答案为网友推荐,仅供参考
相似回答