当前位置:网站首页>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
边栏推荐
- 打印菱形图案
- Decompile and modify the non source exe or DLL with dnspy
- 不得不会的Oracle数据库知识点(四)
- swagger中响应参数为Boolean或是integer如何设置响应描述信息
- On covariance of array and wildcard of generic type
- All in one 1407: stupid monkey
- be based on. NETCORE development blog project starblog - (14) realize theme switching function
- Infiltration learning diary day19
- MySQL deadly serial question 2 -- are you familiar with MySQL index?
- Analysis and solution of lazyinitializationexception
猜你喜欢
功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
Technical practice online fault analysis and solutions (Part 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
Solution of cursor thickening
[dynamic programming] leetcode 53: maximum subarray sum
Conditional test, if, case conditional test statements of shell script
Since the "epidemic", we have adhered to the "no closing" of data middle office services
On covariance of array and wildcard of generic type
Install the pit that the electron has stepped on
How to use AHAS to ensure the stability of Web services?
随机推荐
Understanding of Radix
On covariance of array and wildcard of generic type
Introduction to A-frame virtual reality development
2-Redis架构设计到使用场景-四种部署运行模式(下)
Msp32c3 board connection MSSQL method
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
Ka! Why does the seat belt suddenly fail to pull? After reading these pictures, I can't stop wearing them
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
The culprit of unrestrained consumption -- Summary
Gee: create a new feature and set corresponding attributes
功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
Typescript basic knowledge sorting
String hash, find the string hash value after deleting any character, double hash
不得不会的Oracle数据库知识点(二)
Network layer - routing
Introduction to unity shader essentials reading notes Chapter III unity shader Foundation
Function: find the approximate value of the limit of the ratio of the former term to the latter term of Fibonacci sequence. For example, when the error is 0.0001, the function value is 0.618056.
MySQL introduction - functions (various function statistics, exercises, details, tables)
A dichotomy of Valentine's Day
Introduction to thread pool