Python3.6 中的pyinstaller安裝和使用教程
一、安裝pyinstaller
先安裝anacode,再去安裝python。會(huì)有很多自帶的lib庫,可以省去很多麻煩。
1、用國(guó)外庫安裝
pip install pyinstalller
由于國(guó)外網(wǎng)絡(luò)的限制,經(jīng)常會(huì)報(bào)以下錯(cuò)誤:
ERROR: Could not find a version that satisfies the requirement pyinstalller (from versions: none)
ERROR: No matching distribution found for pyinstalller
可以通過翻墻解決這一問題
2、用國(guó)內(nèi)庫安裝
這里使用的是豆瓣的鏡像進(jìn)行安裝
pip3 install pyinstaller -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com Looking in indexes: http://pypi.douban.com/simple/
如果出現(xiàn)以下問題:
這里主要是是‘enum'參數(shù)問題:
AttributeError: module 'enum' has no attribute 'IntFlag'
通過百度得知,是由于python版本的升級(jí),導(dǎo)致了‘enum'出現(xiàn)兼容性問題,只要卸載‘enum'庫就好了。
pip uninstall enum34
輸出:
Found existing installation: enum34 1.1.6
Uninstalling enum34-1.1.6:
Would remove:
c:\programdata\anaconda3\lib\site-packages\enum34-1.1.6.dist-info\*
c:\programdata\anaconda3\lib\site-packages\enum\*
Proceed (y/n)?
輸入:y
輸出:
Successfully uninstalled enum34-1.1.6
卸載成功,重新輸入安裝指令就可以安裝成功
二、使用pyinstaller
1、pyinstaller常用選項(xiàng)
2、生成exe
pyinstaller -Fw main.py ui.py
最終生成main.exe
總結(jié)
到此這篇關(guān)于Python3.6 pyinstaller安裝和使用的文章就介紹到這了,更多相關(guān)Python3.6 pyinstaller 內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
pytorch之torch_scatter.scatter_max()用法
這篇文章主要介紹了pytorch之torch_scatter.scatter_max()用法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-09-09詳解python的網(wǎng)絡(luò)編程基礎(chǔ)
這篇文章主要為大家介紹了python網(wǎng)絡(luò)編程的基礎(chǔ),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助2022-01-01python創(chuàng)建文件時(shí)去掉非法字符的方法
今天小編就為大家分享一篇python創(chuàng)建文件時(shí)去掉非法字符的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-10-10Django更新models數(shù)據(jù)庫結(jié)構(gòu)步驟
這篇文章主要介紹了Django更新models數(shù)據(jù)庫結(jié)構(gòu)的操作步驟,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2020-04-04解決Shell執(zhí)行python文件,傳參空格引起的問題
今天小編就為大家分享一篇解決Shell執(zhí)行python文件,傳參空格引起的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-10-10在Python的struct模塊中進(jìn)行數(shù)據(jù)格式轉(zhuǎn)換的方法
這篇文章主要介紹了在Python的struct模塊中進(jìn)行數(shù)據(jù)格式轉(zhuǎn)換的方法,文中還給出了C語言和Python語言的數(shù)據(jù)類型比較,需要的朋友可以參考下2015-06-06python繪制詞云圖最全教程(自定義png形狀、指定字體、顏色)
詞云圖是一種直觀的方式來展示文本數(shù)據(jù),它易于理解,能展示出詞語的頻率使用情況,對(duì)于文本分析非常有用,這篇文章主要給大家介紹了python繪制詞云圖(自定義png形狀、指定字體、顏色)的相關(guān)資料,需要的朋友可以參考下2024-05-05