当前位置:网站首页>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
边栏推荐
- Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
- AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
- 老姜的特点
- Make drop-down menu
- Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
- MySQL -- Introduction and use of single line functions
- MySQL - use of aggregate functions and group by groups
- 【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
- C import Xls data method summary V (complete code)
- Function: write function fun to find s=1^k+2^k +3^k ++ The value of n^k, (the cumulative sum of the K power of 1 to the K power of n).
猜你喜欢
![CesiumJS 2022^ 源码解读[8] - 资源封装与多线程](/img/d2/99932660298b4a4cddd7e5e69faca1.png)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程

2-Redis架构设计到使用场景-四种部署运行模式(下)

技术实践|线上故障分析及解决方法(上)

It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction

Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL

How to delete MySQL components using xshell7?

Introduction to A-frame virtual reality development

Thinkphp6 integrated JWT method and detailed explanation of generation, removal and destruction
![[dynamic programming] leetcode 53: maximum subarray sum](/img/f0/80357f9ffc556f3ed4d3aa0901bb1d.jpg)
[dynamic programming] leetcode 53: maximum subarray sum

Long article review: entropy, free energy, symmetry and dynamics in the brain
随机推荐
Who moved my code!
Audio resource settings for U3D resource management
Oracle database knowledge points (IV)
[dynamic programming] leetcode 53: maximum subarray sum
HackTheBox-baby breaking grad
[common error] custom IP instantiation error
MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table
技术实践|线上故障分析及解决方法(上)
求esp32C3板子连接mssql方法
Flutter local database sqflite
gslb(global server load balance)技术的一点理解
功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
[prefix and notes] prefix and introduction and use
Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
Beijing invites reporters and media
Logical operator, displacement operator
Mobile asynchronous sending SMS verification code solution -efficiency+redis
AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
C import Xls data method summary IV (upload file de duplication and database data De duplication)
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)