1.pip install pyinstaller

出现错误:

Could not find a version that satisfies the requirement pyinstaller(from version:)   No matching distribution found for pyinstaller。

原因:被国外墙了,使用豆瓣源来下载。

pip install pyinstaller -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
或者

 

pip install pyinstaller -i https://pypi.douban.com/simple/


2.安装成功后,用pyinstaller来打包python代码:

pyinstaller main.py :即可在本目录生成文件dist

pyinstaller -F main.py :带"-F"是为了生成一个文件dist/main,速度会比上面的方式慢很多。
————————————————
版权声明:本文为CSDN博主「香道人」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_37887537/article/details/79582612

相关文章:

  • 2021-08-01
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2021-04-20
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-21
  • 2021-09-19
  • 2021-11-02
  • 2022-12-23
  • 2021-11-26
  • 2021-04-26
相关资源
相似解决方案