当前位置:网站首页>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
边栏推荐
- Windos10 reinstallation system tutorial
- File contains vulnerability summary
- MySQL introduction - functions (various function statistics, exercises, details, tables)
- Network layer - routing
- C import Xls data method summary II (save the uploaded file to the DataTable instance object)
- Audio resource settings for U3D resource management
- Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
- Analysis and solution of lazyinitializationexception
- 0 basic learning C language - nixie tube dynamic scanning display
- Summary of common tools and technical points of PMP examination
猜你喜欢

be based on. NETCORE development blog project starblog - (14) realize theme switching function

Release and visualization of related data
![CesiumJS 2022^ 源码解读[8] - 资源封装与多线程](/img/d2/99932660298b4a4cddd7e5e69faca1.png)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程

Infiltration learning diary day19

Ka! Why does the seat belt suddenly fail to pull? After reading these pictures, I can't stop wearing them

Make drop-down menu

MySQL - use of aggregate functions and group by groups

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

技術實踐|線上故障分析及解决方法(上)

How to use AHAS to ensure the stability of Web services?
随机推荐
Summary of JWT related knowledge
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
Sequence list and linked list
@EnableAsync @Async
How to use AHAS to ensure the stability of Web services?
C import Xls data method summary I (upload files and create Workbooks)
The culprit of unrestrained consumption -- Summary
How to delete MySQL components using xshell7?
Hbuilder link Xiaoyao simulator
Solution of cursor thickening
Future源码一观-JUC系列
The FISCO bcos console calls the contract and reports an error does not exist
Severity code description the project file line prohibits the display of status error c4996 fopen ('fscanf ', StrCmp): this function or variable may be unsafe The most comprehensive solution
Gnupg website
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
Decompile and modify the non source exe or DLL with dnspy
Thinkphp6 integrated JWT method and detailed explanation of generation, removal and destruction
[common error] UART cannot receive data error
机器学习基础:用 Lasso 做特征选择