需求1:打包成Linux上可执行程序
a. 先下载pyinstaller程序,我当前下载的是PyInstaller-2.1的版本
进行如下操作:
pythoner@pythoner-virtual-machine:~/PyInstaller-2.1$ sudo python2.7 setup.py install
pythoner@pythoner-virtual-machine:~/PyInstaller-2.1$ pwd
/home/pythoner/PyInstaller-2.1
#生成一个单文件可执行的spec文件
pythoner@pythoner-virtual-machine:~/PyInstaller-2.1$ ./utils/makespec.py --onefile ~/05.py wrote /home/pythoner/PyInstaller-2.1