windows下手动安装pyinstaller(python2.7)
2017-03-13 20:00
489 查看
1、首先,安装python2.7.13,官网下载msi版(windows直接安装);
https://www.python.org/downloads/
2、然后,到python包官网依次下载,future,prfile,pywin32,pyinstaller这四个包;
https://pypi.python.org/pypi
下载的时候直接在右上角输入需要下载的包名字,搜索,找到file,下载,
3、依次安装这四个包,举个例子:
future:
下载下来是压缩包,随便放一个目录下,
(1)首先确定电脑已经有python环境变量;
cmd下输入python有信息出来,python2.7.13..........(如果没有请手动加上环境变量,python目录路径,以及
python目录下Scrites目录的路径);
(2)cmd,dos下进入future目录下,运行
python seteup.py install
(3)一般情况都安装成功,如果显示缺什么包,请到python包官网继续下载然后先安装所需的包;
(4)依次安装future,pefile,pywin32,,最后在安装 pyinstaller;
(5)新建一个 hello.py,文件写入 print "hello word!";
cmd 中到hello.py文件目录下,输入:
pyinstaller hello.py -F
这句命令的意思是,把hello.py文件打包成 exe 文件到当前目录下 dist\hello.exe
-F 参数 是生成单一的exe文件
然后进入dist目录下,执行
hello.exe
显示 hello word!
https://www.python.org/downloads/
2、然后,到python包官网依次下载,future,prfile,pywin32,pyinstaller这四个包;
https://pypi.python.org/pypi
下载的时候直接在右上角输入需要下载的包名字,搜索,找到file,下载,
3、依次安装这四个包,举个例子:
future:
下载下来是压缩包,随便放一个目录下,
(1)首先确定电脑已经有python环境变量;
cmd下输入python有信息出来,python2.7.13..........(如果没有请手动加上环境变量,python目录路径,以及
python目录下Scrites目录的路径);
(2)cmd,dos下进入future目录下,运行
python seteup.py install
(3)一般情况都安装成功,如果显示缺什么包,请到python包官网继续下载然后先安装所需的包;
(4)依次安装future,pefile,pywin32,,最后在安装 pyinstaller;
(5)新建一个 hello.py,文件写入 print "hello word!";
cmd 中到hello.py文件目录下,输入:
pyinstaller hello.py -F
这句命令的意思是,把hello.py文件打包成 exe 文件到当前目录下 dist\hello.exe
-F 参数 是生成单一的exe文件
然后进入dist目录下,执行
hello.exe
显示 hello word!
相关文章推荐
- 如何利用Python2.7、py2exe、PyInstaller-2.1将*.py打包成*.exe,再利用Inno Setup Compiler封装成windows安装文件
- windows下Python2.7 的 pyOpenGL模块安装
- Windows下安装python2.7及科学计算套装
- windows下python2.7环境下nltk的安装
- python2.7(Windows平台)安装PIL
- windows安装python mysqldb时报错python version 2.7 required,which was not found in the registry
- windows下python2.7 media模块的安装
- Windows上Python2.7安装Scrapy过程
- windows和python2.7环境下scrapy安装步骤
- Windows Python2.7环境 安装paramiko模块
- Windows 64位 Python 2.7 简单安装MySql模块
- windows 64位安装python2.7
- Windows下安装python2.7及科学计算套装
- Windows下安装python2.7及数据挖掘模块套装
- Windows环境Python2.7安装Scipy
- windows下安装apache2.2 + python2.7 + django---------(1)
- Windows平台下Python2.7中pip的安装方法
- python2.7在windows 64bit下的NumPy函数库的安装
- Windows(64bit)下Python2.7环境安装paramiko模块
- python windows64位 python2.7安装twisted