Pycharm下將py文件打包成exe文件

1. 在PyCharm下安裝PyInstaller

? ?

  1. 1. 首先,打開自己要發布的工程

    PyCharm下如何打包程序成exe?可執行文件?
  2. 2. 點擊底部的【Terminal】打開終端,中輸入命令pip install pyinstaller后回車,如圖所示進行安裝

    PyCharm下如何打包程序成exe?可執行文件
  3. 3. 輸入命令 pyinstaller,回車顯示安裝成功

    PyCharm下如何打包程序成exe?可執行文件
  4. 4. 輸入命令 pyinstaller --console --onefile jingyan_frame.py, 如圖所示發布成功

    PyCharm下如何打包程序成exe?可執行文件
    5. 在工程目錄下/dist文件夾中會有打包好的exe文件,如圖所示
  5. PyCharm下如何打包程序成exe?可執行文件
  6. 6. 雙擊exe文件后,運行結果如下所示
    PyCharm下如何打包程序成exe?可執行文件
  7. ?

2. 在Terminal下輸入:“PyInstaller -F -w *.py” 就可以制作出exe。生成的文件放在同目錄dist下。

????-F(注意大寫)是所有庫文件打包成一個exe,-w是不出黑色控制臺窗口。

????不加-F參數生成一堆文件,但運行快。壓縮后比單個exe文件還小一點點。

????加-F參數生成一個exe文件,運行起來慢。

轉載于:https://www.cnblogs.com/xwgcxk/p/10418662.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/278291.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/278291.shtml
英文地址,請注明出處:http://en.pswp.cn/news/278291.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

什么是自然語言處理,它如何工作?

NicoElNino/Shutterstock.comNicoElNino / Shutterstock.comNatural language processing enables computers to process what we’re saying into commands that it can execute. Find out how the basics of how it works, and how it’s being used to improve our lives. 自…

GIT速查手冊

為什么80%的碼農都做不了架構師?>>> 一、GIT 1.1 簡單配置 git是版本控制系統,與svn不同的是git是分布式,svn是集中式 配置文件位置 # 配置文件 .git/config 當前倉庫的配置文件 ~/.gitconfig 全局配置文件# 查看所有配置項 git …

4-3邏輯非運算符及案例 4-4

創建類 LoginDemo3 這里取反 !(n%30) package com.imooc.operator; import java.util.Scanner;public class LoginDemo3 {public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println("請輸入一個整數");Scanner scnew Scanner(…

assistant字體_如何使用Google Assistant設置和致電家庭聯系人

assistant字體Google谷歌Google Home and Nest smart speakers and displays allow you to make calls without using your phone. By setting up “Household Contacts,” anyone in your home can easily call friends and family members with Google Assistant-enabled dev…

php隊列使用

由于項目中在修改產品的同時要同步關聯水單,刪單,客保 等等數據。所以不可能等待所有都執行完畢以后再給客戶端反饋。所以自己用寫了個隊列。在這里曬出來代碼,以供大家參考。(項目中用到的是tp,所以在這里用tp作為演示) 思路 1,需要用到隊列…

Accoridion折疊面板

詳細操作見代碼&#xff1a; <!doctype html> <html><head><meta charset"UTF-8"><title></title><meta name"viewport" content"widthdevice-width,initial-scale1,minimum-scale1,maximum-scale1,user-scal…

skype快捷鍵_每個Skype鍵盤快捷鍵及其用法

skype快捷鍵Roberto Ricca/Shutterstock羅伯托里卡/ ShutterstockGet familiar with Skype’s unique keyboard shortcuts that will allow you to quickly change your settings, alter your interface, and control your communications. Use these hotkeys and become a Sky…

習慣需要堅持

近期會把本地的資料上傳分享出來&#xff0c;好久沒更新自己的內容了&#xff0c;以后會不斷的更新哦。轉載于:https://blog.51cto.com/haohao1010/2087494

YouTube鍵盤快捷鍵:速查表

Google’s video website wouldn’t be complete without all sorts of useful buttons and hidden commands that aren’t immediately obvious. Use this hotkey cheat sheet to quickly navigate YouTube and gain better control over your video browsing experience. 如果…

第五章 課本題目

例 5.1 使用單分支條件結構輸出兩個數的最大值。 #include<stdio.h> int main() { int a,b,max; scanf("%d,%d",&a,&b); if(a>b) maxa; if(a<b) maxb; printf("max%d\n",max); return 0; } 例 5.2 用雙分支條件語句求最大值。 #includ…

MySQL服務讀取參數文件my.cnf的規律研究探索

在MySQL中&#xff0c;它是按什么順序或規律去讀取my.cnf配置文件的呢&#xff1f;其實只要你花一點功夫&#xff0c;實驗測試一下就能弄清楚&#xff0c;下面的實驗環境為5.7.21 MySQL Community Server。其它版本如有不同&#xff0c;請以實際情況為準。 其實&#xff0c;MyS…

將組策略編輯器添加到控制面板

If you find yourself using the Group Policy Editor all the time, you might have wondered why it doesn’t show up in the Control Panel along with all the other tools. After many hours of registry hacking, I’ve come up with a registry tweak to let you do ju…

cookies和session區別

cookies和session區別 1、Cookie和Session都是會話技術&#xff0c;Cookie是運行在客戶端&#xff0c;Session是運行在服務器端。 2、Cookie有大小限制以及瀏覽器在存cookie的個數也有限制&#xff0c;Session是沒有大小限制和服務器的內存大小有關。3、Cookie有安全隱患&#…

Exchange Server 2016管理系列課件50.DAG管理之激活數據庫副本

激活郵箱數據庫副本是將特定被動副本指定為郵箱數據庫的新主動副本的過程。我們將此過程稱為數據庫切換。數據庫切換過程是指卸除當前的活動數據庫&#xff0c;然后在指定的服務器上將相應的數據庫副本作為新的活動郵箱數據庫副本進行裝載。成為活動郵箱數據庫的數據庫副本必須…

常見設計模式 (python代碼實現)

1.創建型模式 單例模式 單例模式&#xff08;Singleton Pattern&#xff09;是一種常用的軟件設計模式&#xff0c;該模式的主要目的是確保某一個類只有一個實例存在。當你希望在整個系統中&#xff0c;某個類只能出現一個實例時&#xff0c;單例對象就能派上用場。 比如&#…

記錄一次解決httpcline請求https報handshake_failure錯誤

概述 當使用httpclinet發起https請求時報如下錯誤&#xff1a; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failureat com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)at com.sun.net.ssl.internal.ssl.Alerts.getSSLExcep…

桌面程序explorer_備份Internet Explorer 7搜索提供程序列表

桌面程序explorerIf you are both an IE user and a fan of using custom search providers in your search box, you might be interested to know how you can back up that list and/or restore it on another computer. Yes, this article is boring, but we’re trying to…

C++內聯函數(inline function)

c從c中繼承的一個重要特征就是效率。假如c的效率明顯低于c的效率&#xff0c;那么就會有很大的一批程序員不去使用c了。 在c中我們經常把一些短并且執行頻繁的計算寫成宏&#xff0c;而不是函數&#xff0c;這樣做的理由是為了執行效率&#xff0c;宏可以避免函數調用的開銷&am…

GreenPlum數據庫故障恢復測試

本文介紹gpdb的master故障及恢復測試以及segment故障恢復測試。 環境介紹&#xff1a;Gpdb版本&#xff1a;5.5.0 二進制版本操作系統版本&#xff1a; centos linux 7.0Master segment: 192.168.1.225/24 hostname: mfsmasterStadnby segemnt: 192.168.1.227/24 hostname: ser…

書評:Just the Computer Essentials(Vista)

Normally we try and focus on articles about how to customize your computer, but today we’ll take a break from that and do a book review. This is something I’ve not done before, so any suggestions or questions will be welcomed in the comments. 通常&#x…