当前位置:网站首页>Pyinstaller packaging Exe (detailed tutorial)
Pyinstaller packaging Exe (detailed tutorial)
2022-06-12 01:35:00 【hacker707】
pack .py file
Why to pack ?
1: When you want to do what you do python Games or scripts .py When documents are sent to others , Packaging for .exe file , Even if it's not installed python It can also run
2: Just want to show hhh
install pystaller
install pystaller It's simple , direct cmd Use pip Command is enough
pip install pystaller
pystaller Package single .py File steps
Use the clock made before as an example to demonstrate
1: Click in the area below to enter cmd Switch to the target file directory 
2: Input pystaller -F -w Analog_clock.py You can enter.
When the following prompt appears, the package is successful 
3: Packaging success will be in .py The following files appear in the same level directory of the file ,dist Inside is packed .exe file
Click to run 


In this way, the packaged single file is completed , Is it right? so easy !!!
Package multiple .py File steps
Use alien invasion as an example to demonstrate
1: Package the master file alien_invasion.py( The same steps as packing a single file )
I won't go into details here , Directly above !!!
2: Move other files that depend on the master file to dist In the folder , Click on the packaged exe File ready to run 
pyinstaller Common parameters
-F Only in dist To create a exe file .
-w Only right windows It works , Do not use the console .
-D The default option , except exe Outside , Still in dist Many dependent files are generated in , Recommended .
-i Set nice ico Format icons , Add this parameter , Specify icon path .
-p Set the import path
That's all pyinstaller pack exe The whole tutorial of , Welcome to visit , If it helps , Let's have a three company support , I will continue to update it in the future ~
If there are suggestions for improvement , Welcome to leave a message in the comment area ~
边栏推荐
- "It's safer to learn a skill!" The little brother of Hangzhou campus changes to software testing, and likes to mention 10k+ weekend!
- 【ROE】(2)ROE协议
- Weibull Distribution韦布尔分布的深入详述(2)参数和公式意义
- Detailed explanation and examples of common parameters of curl
- Data visualization big screen - big screen cloud minimalist user manual
- Common assertions for JMeter interface testing
- Image retrieval based on cross modal AI model
- Such a change in people's understanding of the industrial Internet is not achieved overnight
- How to access the traifik proxy dashboard using the rancher desktop
- The resignation of the chief oracle engineer was furious: MySQL is a terrible database, so it is recommended to consider PostgreSQL!
猜你喜欢

【项目实训】校验注解

Redis startup and shutdown commands

kmeans从0到1

Don't write about the full screen explosion, try the decorator mode, this is the elegant way!!

Several visualization methods of point cloud 3D object detection results (second, pointpillars, pointrcnn)

Matlab 基础04 - 冒号Colon operator “:”的使用和复杂应用详析

打造Flutter高性能富文本编辑器——渲染篇

Kmeans from 0 to 1

How to access the traifik proxy dashboard using the rancher desktop

The annual salary of testers in large factories ranges from 300000 to 8K a month. Roast complained that the salary was too low, but he was ridiculed by netizens?
随机推荐
中创专利|中国5G标准必要专利达1.8万项,尊重知识产权,共建知识产权强国
华为,这也太强了吧..
Recursive and non recursive transformation
2022工具钳工(高级)复训题库及在线模拟考试题库来源:安全生产模拟考试一点通公众号
Point cloud perception algorithm interview knowledge points (I)
Uniapp gets the instance of the previous page
Concepts of programs, processes, and threads
“還是學一門技術更保險!”杭州校區小哥哥轉行軟件測試,喜提10K+雙休!
实体类DTO转VO通过插件转化
Watermelon video synchronization Tiktok also has benefits ~ the official "China Video Partner Program"
You don't need to show your talent. The method is here. You earn 9844 in 31 days as an we media
Loop loop and CX
2022 tool fitter (Advanced) recurrent training question bank and online simulation examination question bank source: YiDianTong official account of safety production simulation examination
The road of global evolution of vivo global mall -- multilingual solution
The annual salary of testers in large factories ranges from 300000 to 8K a month. Roast complained that the salary was too low, but he was ridiculed by netizens?
How much is the child's critical illness insurance coverage appropriate? Which product is better now
Global and Chinese lutetium oxide powder industry investigation and analysis and Investment Strategy Research Report 2022-2028
Pytorch model loading and saving, and training based on the saved model
Simplified interpretation of accuracy and recall in AI papers
New knowledge: monkey improved app crawler