In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to package Python into exe files, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have a harvest after reading this article on how to package Python into exe files, let's take a look at it.
First, install → pyinstaller1.1 1:cmd1. Call up the run window: win + r, and type cmd2. Change to the pip.exe directory (Scripts, see below) cd C:UsersAdministratorAppDataLocalProgramsPythonPython38-32Scripts # D: # if it is another disk, such as D # cd D:xx 3. Execute the command pip install pyinstaller
1. Change to the pip.exe directory (find your local pip directory path)
Import os# lib is the directory of the path library, and Scripts is the directory of pip.exe lib = os.path.dirname (os.path.__file__) pip = os.path.join (os.path.dirname (lib), 'Scripts') # print (lib) print (pip)
two。 Install pyinstaller
1.2Mode 2:Pycharm1. Call up the execution command window: shortcut key Alt + F 122. Change to the Pycharm Scripts directory (1) cd D:xxvenvScript # xx: your local path (2) pip install pyinstaller
The simplest: select pyinstaller,Alt + Enter and select the installation directly.
(lower right corner) prompt that the installation is successful.
Second, pack → pyinstaller-F *. Py1. Command: pyinstaller-F *. Py (asterisk is the full path of the py file, the following figure) (1) F: 'uppercase' (2) *: 'absolute path of the .py file to be packaged' 2. Note that (1) in the absolute path, there can be no 'spaces' in the absolute path. This is the end of the article on "how to package Python into exe files". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to package Python into exe files". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.