简体   繁体   English

Pyinstaller 没有找到加密。 (即使在隐藏导入中)

[英]Pyinstaller doesn't find crypto. (even in hidden import)

I word with windows 10, python 3.7.我用 Windows 10 说,python 3.7。 (i am also a linux user and to be honest i don't try this with fedora should i try ?) I use the lastest version of pyinstaller. (我也是 linux 用户,老实说,我不应该在 Fedora 上尝试这个吗?)我使用最新版本的 pyinstaller。

When i execute the .exe "ModuleNotFoundError: No module named 'Crypto'"当我执行 .exe “ModuleNotFoundError: No module named 'Crypto'”

I double check, Crypto is installed.我仔细检查,加密已安装。

(I don't need comment like : don't use crypto because it is not safe) (我不需要这样的评论:不要使用加密,因为它不安全)

So, since yesterday, l search online.所以,从昨天开始,我在网上搜索。

At the begining, i didn',t know for the hidden import.一开始,我不知道隐藏的导入。 So i add it to the in the .spec.所以我将它添加到 .spec 中。 But the error still come up.但是错误仍然出现。

Then i try to add the hidden import in command and obviously same error.然后我尝试在命令中添加隐藏的导入,显然是同样的错误。

I read some other post, and i don't really understand the hook.py stuff.我阅读了其他一些帖子,但我不太了解 hook.py 的内容。 In the github projectof pyinstaller, i find a hook folder.在pyinstaller的github项目中,我找到了一个hook文件夹。 And i don't have it on my computer.而且我的电脑上没有。 Should i have them ?我应该拥有它们吗?

But soemthing weird came up, i have a file in dist\\prepare\\libcrypto-1_1.dll但是出现了一些奇怪的事情,我在 dist\\prepare\\libcrypto-1_1.dll 中有一个文件

And if this file is really about crypto why the .exe don't use it ?如果这个文件真的是关于加密的,为什么 .exe 不使用它?

I try with --onefile and --onefolder doesn't change anything.我尝试使用 --onefile 和 --onefolder 不会改变任何东西。

if you need something, let me know, i will edit the post.如果您需要什么,请告诉我,我会编辑帖子。

Thank you for your help, and sorry if the question may sound like stupid.感谢您的帮助,如果您的问题听起来很愚蠢,我深表歉意。 And sorry for my english ^^对不起我的英语^^

I find the reason, i am a noob我找到原因了,我是菜鸟

I make a copy of my python direcotry in C:/ and pyinstaller don't find it.^^(because i need it for my IDE)我在 C:/ 中复制了我的 python 目录,但 pyinstaller 找不到它。^^(因为我的 IDE 需要它)

My bad ^^我的坏^^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM