久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何使pyinstaller不使用anaconda并構(gòu)建一個(gè)小型exe文

How to make pyinstaller not use anaconda and build a small-size exe file(如何使pyinstaller不使用anaconda并構(gòu)建一個(gè)小型exe文件)
本文介紹了如何使pyinstaller不使用anaconda并構(gòu)建一個(gè)小型exe文件的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我一直在嘗試在 Windows 10 中使用 pyinstaller 構(gòu)建 .exe 文件.它有效,但 exe 文件的大小約為 212 MB,即使使用 venv 也是如此(如 這里).我想這可能是因?yàn)槲艺谑褂?anaconda 的 python!

I have been trying to build .exe file using pyinstaller in windows 10. It worked, but the size of the exe file is ~212 MB, even by using a venv (as in here). I thought it might be because I am using python by anaconda!

然后我安裝了一個(gè)單獨(dú)的 Python 版本,所以不要使用 anaconda!但它不起作用(仍然是大文件).

Then I installed a separate version of Python so not to use anaconda! But it did not work (still large file).

然后我卸載了 anaconda 進(jìn)行測(cè)試.Pyinstaller 仍在嘗試訪問(wèn)C:Program Filesanaconda3python.exe"中的 Python(此錯(cuò)誤:C:Program Filesanaconda3python.exe"中沒(méi)有 Python).但是我已經(jīng)刪除了所有到 anaconda 的路徑.可能它一直試圖到達(dá) anaconda,這就是為什么我沒(méi)有成功構(gòu)建一個(gè)小尺寸的 .exe 文件.

Then I uninstalled anaconda to test it. Pyinstaller is still trying to access Python in 'C:Program Filesanaconda3python.exe' (this error: No Python at 'C:Program Filesanaconda3python.exe'). However I have removed all path to anaconda. Probably it has always tried to reach anaconda, and this is why I haven't been successful to build a small size .exe file.

如何清楚地指明 pyinstaller 和 python 的路徑?

How can I clearly indicate paths for pyinstaller and python?

推薦答案

終于,經(jīng)過(guò)大量研究,可以解決我的問(wèn)題:

Finally, after a lot of researching, could solve my problem:

  • 從我的電腦上卸載了所有的 python 和 anaconda
  • 從系統(tǒng)變量中刪除所有路徑
  • 重新啟動(dòng)窗口
  • 從其網(wǎng)站安裝了新的 Python
  • 使用 pip install pyinstaller 安裝 Pyinstaller
  • 在 cmd 中測(cè)試了我的 .py 代碼.它向我展示了所有丟失的包裹.
  • 使用 pip install name-of-package
  • 安裝了所有必需的包
  • 通過(guò) pyinstaller -F -w --clean file.py 運(yùn)行最終命令
  • (可選)根據(jù)需要安裝 Anaconda(不要將 Anaconda Python 添加為默認(rèn) Python.也不要將其路徑添加到系統(tǒng)變量中).

注意:您可以在其中構(gòu)建 virtualenv 并執(zhí)行 pyinstaller.

Note: You can build virtualenv and do pyinstaller in them.

我之前使用 anaconda 的嘗試導(dǎo)致文件大小為 212 MB.這個(gè)過(guò)程生成了一個(gè)大小為 27 MB 的 .exe 文件(僅導(dǎo)入 pandas 模塊).

My previous tries which used anaconda resulted in file of 212 MB in size. This process generated a .exe file of size 27 MB (Importing only pandas module).

這篇關(guān)于如何使pyinstaller不使用anaconda并構(gòu)建一個(gè)小型exe文件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時(shí)出現(xiàn)問(wèn)題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節(jié)點(diǎn))
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應(yīng)并將元素值存儲(chǔ)在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標(biāo)記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對(duì)象)
主站蜘蛛池模板: 精品福利av导航 | 日韩精品 电影一区 亚洲 | 国产激情视频 | 国产一级一级毛片 | 99欧美精品 | 中文在线一区二区 | 中文字幕视频在线 | 亚洲精品乱码久久久久久久久 | 欧美视频网 | 午夜一区二区三区 | 色天天综合| 天堂免费 | 色视频在线观看 | 日本视频一区二区 | 中文字幕成人av | 中文字幕在线观看视频一区 | 午夜精品久久久久久不卡欧美一级 | 亚洲成人在线网 | 黄色三级免费网站 | 国产精品久久久久久久久久久久 | 久久精品欧美一区二区三区麻豆 | 中文字幕亚洲精品 | 午夜精品久久久久久久 | 国产精品久久久久久久久久久新郎 | 精品国产一区二区三区免费 | 日韩综合在线 | 成人av一区二区亚洲精 | 福利成人 | 91国内精品久久 | 久久久久久久久久影视 | 亚洲精品女优 | 久久久久久国产精品 | 国产精品久久久久久久久久 | 国产激情偷乱视频一区二区三区 | 国产综合精品 | 国产九九av| 亚洲精品麻豆 | 久久手机视频 | 亚洲国产成人精品女人久久久 | 久优草| 激情福利视频 |