首先安装pyinstaller

命令pip3 install pyinstaller

到项目要运行的代码的那个.py档案(例如testPyinstaller.py),右键copy path,

(例如我的是D:\workspaceForPy\testPyinstaller\.idea\testPyinstaller.py)

到项目目录(idea右键show in explorer)

如何将python的项目部署到其他没有安装python环境的电脑

 

在cmd窗口运行 pyinstaller D:\workspaceForPy\testPyinstaller\.idea\testPyinstaller.py

如何将python的项目部署到其他没有安装python环境的电脑

 

然后项目目录里就有一个dist的文件夹,里面有一个testPyinstaller的文件夹,将这个文件夹压缩后,拿到其他电脑,解压缩后运行里面的testPyinstaller.exe

如何将python的项目部署到其他没有安装python环境的电脑

如何将python的项目部署到其他没有安装python环境的电脑

相关文章:

  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2021-05-24
  • 2021-08-21
  • 1970-01-01
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2021-11-04
  • 2021-10-04
  • 2021-05-22
  • 2021-09-15
  • 2021-11-02
  • 2021-10-26
  • 2021-06-29
相关资源
相似解决方案