zoukankan      html  css  js  c++  java
  • pyinstaller使用-python项目转换成exe可执行文件

    Python版本:Python3.5.2

    一、安装Pyinstaller

    1、安装pyinstaller

    使用pip命令安装:pip install pyinstaller

    pip install pyinstaller
    

    安装报错的话就是其他依赖环境没装

    pip3 install Twisted-18.7.0-cp35-cp35m-win32.whl
    pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple selenium
    pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple scrapy
    pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
    

      

    二、使用Pyinstaller

    1、使用下载安装的方式安装的Pyinstaller打包方式

    pyinstaller -F odoo.py
    

      

    2、输入参数的含义

    • -F 表示生成单个可执行文件

    • -w 表示去掉控制台窗口,这在GUI界面时非常有用。不过如果是命令行程序的话那就把这个选项删除吧!

    • -p 表示你自己自定义需要加载的类路径,一般情况下用不到

    • -i 表示可执行文件的图标

    其他参考:https://www.cnblogs.com/gopythoner/p/6337543.html

  • 相关阅读:
    StopAllSounds
    GotoAndPlay
    区间(interval)
    因数(factor)
    [HAOI2009]逆序对数列
    生物分子gene
    数轴line
    [SCOI2008]配对
    精力(power)
    bzoj4987: Tree(树形dp)
  • 原文地址:https://www.cnblogs.com/chen0307/p/9634421.html
Copyright © 2011-2022 走看看