如何重新编译Pyinstaller的引导程序 [英] how to recompile the bootloader of Pyinstaller

查看:448
本文介绍了如何重新编译Pyinstaller的引导程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过搜索我发现的答案,我对使用PyInstaller生成的exe文件有AntiVirus误报问题女巫包括重新编译引导程序,而我只是做不到. 这是我到目前为止尝试过的:

I have an AntiVirus false positive problem of my exe file generated using PyInstaller, by searching i found this answer witch consist of recompiling the bootloader and i just can't get it done. This what i've tried so far:

  1. 出于某些原因,尝试使用"choco install -y vcbuildtools"使用choco安装C ++生成工具.
  2. python ./waf distclean all收到错误can't open file './waf': [Errno 2] No such file or directory
  3. 安装MinGW-w64并设置路径,然后重试,我得到了相同的错误.
  1. try to install C++ build-tools with choco using "choco install -y vcbuildtools" for some reasons the installation failed.
  2. installing visual studio community from here then goes to "cd bootloader" and do python ./waf distclean all got the error can't open file './waf': [Errno 2] No such file or directory
  3. installing MinGW-w64 and setting the path then retry, i got the same error.

或者也许还有另一种方法可以使可执行文件不被检测为病毒/木马.

Or maybe there is another way to make the executable not detected as virus/trojan.

使用的软件包:PyQt5,pysnmp,pandas,numpy.

Packages used : PyQt5, pysnmp, pandas, numpy.

多亏@Ana Knickerbocker的回答,我才得以进步,现在当我运行python ./waf all时,我得到了错误: Python Version : 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] Checking for 'msvc' (C compiler) : not found Checking for 'gcc' (C compiler) : not found Checking for 'clang' (C compiler) : not found could not configure a C compiler!

Thanks to @Ana Knickerbocker answer i was able to make a progression, now when i run python ./waf all i got the error : Python Version : 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] Checking for 'msvc' (C compiler) : not found Checking for 'gcc' (C compiler) : not found Checking for 'clang' (C compiler) : not found could not configure a C compiler!

我想我仍然没有编译器,我已经尝试过pip install vsbuildtools,但是我收到了以下消息:No matching distribution found for vcbuildtools有什么想法吗?

I guess i still don't have a compiler, i've tried pip install vsbuildtoolsbut i got this message : No matching distribution found for vcbuildtools any ideas ?

在Windows 7 x64上为我

Im on Windows 7 x64

推荐答案

嘿,您不需要Visual Studio来构建pyinstaller的引导加载程序,如果您安装了python或python3,则可以在终端中进行操作.重要的是要知道您正在使用哪一个. 我假设您使用的是python3,请在您的终端/命令行中尝试以下步骤:

Hey you don't need visual studio to build pyinstaller's bootloader, you can do it in your terminal if you have python or python3 installed. It's important to know which one you are using. I will assume you use python3, try the following steps in your terminal/command line:

1)git clone https://github.com/pyinstaller/pyinstaller

1) git clone https://github.com/pyinstaller/pyinstaller

2)cd pyinstaller,然后是cd bootloader

2) cd pyinstaller, then cd bootloader

3)运行"python3 ./waf distclean all"以为您的系统构建引导程序.

3) Run "python3 ./waf distclean all" to build the bootloader for your system.

4)构建引导程序后,键入:"python3 setup.py install"

4) Once the bootloader has been built, type in: "python3 setup.py install"

5)这应该已经安装了pyinstaller.在终端中输入pyinstaller,然后按Enter键.它应该可以识别该命令,但是会抱怨更多的参数.

5) This should have installed pyinstaller. Type pyinstaller in the terminal and hit enter. It should recognize the command, but it will complain about more arguments.

6)使用命令"pyinstaller yourfile.py"创建可执行文件.

6) Use the command "pyinstaller yourfile.py" to create your executable.

希望这对您有帮助!

这篇关于如何重新编译Pyinstaller的引导程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆