网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

使用Pyinstaller转换.py文件为.exe可执行程序过程详解-创新互联

 前言

目前创新互联公司已为上1000+的企业提供了网站建设、域名、虚拟主机绵阳服务器托管、企业网站设计、上党网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

pyinstaller能够在Windows、Linux等操作系统下将Python脚本打包成可直接运行程序。使Python脚本可以在没有安装Python的环境中直接运行,方便共享。

开发环境


python 2.7.12 + Windows7

注意事项

1、待转换的.py文件绝对路径最好不要包含中文字符。容易出现一些莫名其妙的问题。

2、python中需要有.py文件中用到的第三方库。否则在转换后的.exe文件中会出现不符合预期的结果。

pyinstaller安装步骤


1、配置pip镜像源。pip配置方法参考pip配置和安装第三方模块。如果已经配置,跳过。

2、打开cmd命令行窗口,输入pip install pyinstaller,安装pyinstaller库。

C:\Users\Administrator>pip install pyinstaller
Collecting pyinstaller
 Downloading http://pypi.doubanio.com/packages/3c/86/909a8c35c5471919b3854c01f43843d9b5aed0e9948b63e560010f7f3429/PyIns
taller-3.3.1.tar.gz (3.5MB)
  100% |████████████████████████████████| 3.5MB 112kB/s
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from pyinstaller)
Requirement already satisfied: pefile>=2017.8.1 in c:\python27\lib\site-packages (from pyinstaller)
Requirement already satisfied: macholib>=1.8 in c:\python27\lib\site-packages (from pyinstaller)
Requirement already satisfied: dis3 in c:\python27\lib\site-packages (from pyinstaller)
Requirement already satisfied: future in c:\python27\lib\site-packages (from pyinstaller)
Requirement already satisfied: altgraph>=0.15 in c:\python27\lib\site-packages (from macholib>=1.8->pyinstaller)
Installing collected packages: pyinstaller
 Running setup.py install for pyinstaller ... done
Successfully installed pyinstaller-3.3.1

网站题目:使用Pyinstaller转换.py文件为.exe可执行程序过程详解-创新互联
本文链接:http://bjjierui.cn/article/cschdd.html

其他资讯