当前位置:网站首页>Pyinstaller packaging py script warning:lib not found and other related issues
Pyinstaller packaging py script warning:lib not found and other related issues
2022-07-04 01:19:00 【Programmer base camp】
Use Pyinstaller pack py by exe Since the document , I will always encounter Warning:lib not found And so on , Such as :

Although most of the time , You ignore these like me warning, After packaging exe It can also run . There are a lot of methods on the Internet , It is suggested to install win7 Of , There are also suggestions to change 32 position python Of documents , Prompt to download 2G Size correlation SDK Of . All in all , Namely pyinstaller For the current win10 Not supportive enough ! But these online methods are too expensive , Then don't change win10 X64 System , No change python edition (3.6.4) Under the circumstances , How to use... Gracefully pyinstaller And there is no full screen warning What about the hint ?
After a little groping , Finally found a way ,pyinstaller Prompt these that cannot be found dll file , such as api-ms-win-crt-runtime-l1-1-0.dll Actually stay win10 It also exists in the system , Most of it is in :C:\Windows\System32\downlevel Path and its upper path C:\Windows\System32 Next , Here's the picture :

We only need to add these two paths to the user environment variables .

After adding environment variables ,pyinstaller REPACK py When you file , Will give priority to finding in these paths , You can package it successfully .PS: Remember to log out of the system and log in again , To take effect !
Pack again , The page is much cleaner ,win10 X64 The next test is effective !

PS: It should be noted that , Many times we pyinstaller pack py Although the file shows “ success ”, But really run exe file , Still report a mistake , Such as fail to execute script And so on , The terminal interface often flashes , Many times we can't even see the specific reason with our naked eyes ! Crawling has a stupid way —— Recording screen . Recommend an easy-to-use screen recording software Ocam. The prompt information that seems to flash by the naked eye will be completely recorded by the screen recording software , formation mp4 file , Let's use the pause function of the player , You can locate the error message . Here are a few errors I encountered during execution :


At this time, the problem is simple , such as , The above two figures suggest , A module that cannot be found distuils, A hint: you need to install dependent libraries xlrd. We will distuils Folder from python The file location corresponds to lib Found under file , Put it in our python(env) Under the corresponding folder ,xlrd Directly pip Can be installed .

ps: If what you want to package is quoted like me pandas Library py file , Try not to directly import pandas as pd, It's packed like this exe The file is very large , You can refer to any function you want to use , Such as :
from pandas import read_csv,read_excel,DataFrame,concat
边栏推荐
- 不得不会的Oracle数据库知识点(四)
- Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
- Windos10 reinstallation system tutorial
- 2-Redis架构设计到使用场景-四种部署运行模式(下)
- Typescript basic knowledge sorting
- PMP 考试常见工具与技术点总结
- 【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
- Mongodb learning notes: command line tools
- 查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
- In the process of seeking human intelligent AI, meta bet on self supervised learning
猜你喜欢

Infiltration learning diary day19
![[common error] custom IP instantiation error](/img/de/d3f90cd224274d87fcf153bb9244d7.jpg)
[common error] custom IP instantiation error

A-Frame虚拟现实开发入门

Release and visualization of related data

How to set the response description information when the response parameter in swagger is Boolean or integer

MySQL deadly serial question 2 -- are you familiar with MySQL index?

老姜的特点

长文综述:大脑中的熵、自由能、对称性和动力学

Beijing invites reporters and media

Technical practice online fault analysis and solutions (Part 1)
随机推荐
A dichotomy of Valentine's Day
All in one 1412: binary classification
File contains vulnerability summary
Oracle database knowledge points that cannot be learned (II)
不得不会的Oracle数据库知识点(二)
QML add gradient animation during state transition
手机异步发送短信验证码解决方案-Celery+redis
Future源码一观-JUC系列
老姜的特点
Logical operator, displacement operator
A-Frame虚拟现实开发入门
Typescript basic knowledge sorting
删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
In the process of seeking human intelligent AI, meta bet on self supervised learning
Sequence list and linked list
功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
swagger中响应参数为Boolean或是integer如何设置响应描述信息
打印菱形图案
Mobile asynchronous sending SMS verification code solution -efficiency+redis
【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示