当前位置:网站首页>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
- Sequence list and linked list
- be based on. NETCORE development blog project starblog - (14) realize theme switching function
- MySQL - use of aggregate functions and group by groups
- Technical practice online fault analysis and solutions (Part 1)
- Solution of cursor thickening
- Infiltration learning diary day19
- How to delete MySQL components using xshell7?
- 查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
- It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
猜你喜欢

【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示

Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".

Pratique technique | analyse et solution des défaillances en ligne (Partie 1)

AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用

2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)

swagger中响应参数为Boolean或是integer如何设置响应描述信息

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).

The FISCO bcos console calls the contract and reports an error does not exist

String hash, find the string hash value after deleting any character, double hash

A dichotomy of Valentine's Day
随机推荐
Stringutils and collectionutils
CLP information - how does the digital transformation of credit business change from star to finger?
MySQL -- Introduction and use of single line functions
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
Introduction to A-frame virtual reality development
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
MySQL introduction - functions (various function statistics, exercises, details, tables)
MySQL deadly serial question 2 -- are you familiar with MySQL index?
Summary of common tools and technical points of PMP examination
Solution of cursor thickening
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
The first training of wechat applet
Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
Avoid playing with super high conversion rate in material minefields
C import Xls data method summary IV (upload file de duplication and database data De duplication)
Ka! Why does the seat belt suddenly fail to pull? After reading these pictures, I can't stop wearing them
长文综述:大脑中的熵、自由能、对称性和动力学
51 MCU external interrupt
Hbuilder link Xiaoyao simulator
Fundamentals of machine learning: feature selection with lasso