惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Engineering at Meta
Engineering at Meta
B
Blog
博客园_首页
量子位
博客园 - 叶小钗
L
LangChain Blog
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
D
DataBreaches.Net
雷峰网
雷峰网
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
TaoSecurity Blog
TaoSecurity Blog
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
I
Intezer
H
Help Net Security
The Hacker News
The Hacker News
The Register - Security
The Register - Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
AWS News Blog
AWS News Blog
V
V2EX
Microsoft Security Blog
Microsoft Security Blog
T
Tenable Blog
Spread Privacy
Spread Privacy
A
Arctic Wolf
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Schneier on Security
Schneier on Security
C
CERT Recently Published Vulnerability Notes
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Last Watchdog
The Last Watchdog
Latest news
Latest news
T
Troy Hunt's Blog
L
LINUX DO - 热门话题

博客园 - pmh905001

爬虫-今日头条我的收藏-反爬虫分析(六) pycharm的没落,vs code的兴起 爬虫-今日头条我的收藏-增量式下载网页内容(五) 爬虫-今日头条我的收藏-增量式导入到Elastic Search(四) 今日头条源代块一行代码很长情况下的拖动问题 爬虫-今日头条我的收藏-增量式导入到mongodb(三) 爬虫-今日头条我的收藏-增量式(二) openpyxl一个bug 爬虫-今日头条我的收藏(一) pystray被隐藏菜单项显示出来的问题 pyinstaller生成的exe程序使用使用默认程序打开execel文件 pyinstaller生成的exe文件的所在的工作目录问题 windows下python的keyboard库在锁屏之后再次登陆快捷键(热键)失效问题 windows下gitbash 鼠标左键选中文字自动自行终止命令 ctrl+c ^C spring-security 如何使用用户名或邮箱登录 tomcat jndi context.xml的特殊字符转义问题 struts2的优缺点以及如何改造 jetty-maven-plugin 版本导致jetty启动失败问题 Eclipse下pom.xml的提示 Cannot access defaults field of Properties
pyinstaller 报错ImportError: No module named _bootlocale
pmh905001 · 2023-09-13 · via 博客园 - pmh905001

生成环境的安装包,执行如下命令会有报错:

pyinstaller -wF -p venv310/Scripts -p venv310/Lib/site-packages --add-data "./fish.jpg:." --add-data "./kb.ini:." -i fish.ico -n program_name main.py

328 INFO: PyInstaller: 3.6
328 INFO: Python: 3.10.11
343 INFO: Platform: Windows-10-10.0.19045-SP0

...
359 INFO: checking Analysis 359 INFO: Building Analysis because Analysis-00.toc is non existent 359 INFO: Initializing module dependency graph... 374 INFO: Caching module graph hooks... 390 INFO: Analyzing base_library.zip ... 6081 INFO: Processing pre-find module path hook distutils 6097 INFO: distutils: retargeting to non-venv dir 'D:\\daily-tasks\\software\\python310\\lib' Traceback (most recent call last): File "D:\daily-tasks\software\python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\daily-tasks\software\python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\daily-tasks\github\shouyu\venv310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module> File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\__main__.py", line 114, in run run_build(pyi_config, spec_file, **vars(args)) File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build exec(code, spec_namespace) File "D:\daily-tasks\github\shouyu\授渔.spec", line 6, in <module> a = Analysis(['main.py'], File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\building\build_main.py", line 244, in __init__ self.__postinit__() File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__ self.assemble() File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\building\build_main.py", line 342, in assemble self.graph = initialize_modgraph( File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\depend\analysis.py", line 729, in initialize_modgraph graph = PyiModuleGraph( File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\depend\analysis.py", line 117, in __init__ self._analyze_base_modules() File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\depend\analysis.py", line 234, in _analyze_base_modules self._base_modules = [mod File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\depend\analysis.py", line 236, in <listcomp> for mod in self.import_hook(req)] File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1480, in import_hook target_package, target_module_partname = self._find_head_package( File "d:\daily-tasks\github\shouyu\venv310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1664, in _find_head_package raise ImportError("No module named " + target_package_name) ImportError: No module named _bootlocale (venv310)

查看pypi最新版本,最新版本到了 5.13.2。当前安装却是如下:

$ pip list | grep Installer
PyInstaller    3.6

版本不兼容问题,果断重新安装,问题解决。

pip uninstall PyInstaller
pip install PyInstaller