当前位置:网站首页>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
边栏推荐
- Future source code view -juc series
- 技術實踐|線上故障分析及解决方法(上)
- How to set the response description information when the response parameter in swagger is Boolean or integer
- Introduction to A-frame virtual reality development
- 打印菱形图案
- gslb(global server load balance)技术的一点理解
- MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table
- Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?
- 2-Redis架构设计到使用场景-四种部署运行模式(下)
- MPLS experiment
猜你喜欢

Meta metauniverse female safety problems occur frequently, how to solve the relevant problems in the metauniverse?

功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。

Mobile asynchronous sending SMS verification code solution -efficiency+redis

Introduction to unity shader essentials reading notes Chapter III unity shader Foundation

查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题

Gauss elimination method and template code

Huawei rip and BFD linkage

Future source code view -juc series

A malware detection method for checking PLC system using satisfiability modulus theoretical model

Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
随机推荐
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
String hash, find the string hash value after deleting any character, double hash
How to use AHAS to ensure the stability of Web services?
In the process of seeking human intelligent AI, meta bet on self supervised learning
手机异步发送短信验证码解决方案-Celery+redis
C import Xls data method summary II (save the uploaded file to the DataTable instance object)
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)
“疫”起坚守 保障数据中台服务“不打烊”
Functions and arrays of shell scripts
Oracle database knowledge points that cannot be learned (III)
中电资讯-信贷业务数字化转型如何从星空到指尖?
Who moved my code!
Summary of common tools and technical points of PMP examination
Windos10 reinstallation system tutorial
Design of database table foreign key
I don't care about you. OKR or KPI, PPT is easy for you
1-Redis架构设计到使用场景-四种部署运行模式(上)
MySQL introduction - functions (various function statistics, exercises, details, tables)
GUI 应用:socket 网络聊天室
All in one 1412: binary classification