Avast blocks pip and Pyinstaller

偶尔善良 提交于 2021-01-24 11:57:09

问题


I'm making a Simple GUI Tkinter Program. I was going to compile my Program (with Pyinstaller) but Avast is blocking PIP. So I ignored it. When Compile was Finished. I run the compiled .exe program and the program are saying: failed to execute the script, Avast is blocking. How to fix this error and What am the issue?

edit:now Avast is not blocking .exe(but blocking PIP)


回答1:


I use avast as well. Avast sandboxes pipenv when installing a new package. Depending on what/if virtualenv your using.

You can whitelist/exclude python's install directory. For windows the default location is %localappdata%\Programs\Python. This is also where pip is installed globally as well as pyinstaller and other packages that are installed globally.

Be warned this will make it so avast no longer scans anything related to python in those directories. So if you're worried about getting a virus from a python package then you can whitelist/exclude the pip exe itself which is located specifically...

32-bit Python 3.8

%localappdata%\Programs\Python\Python38-32\Scripts\pip.exe

64-bit Python 3.8

%localappdata%\Programs\Python\Python38\Scripts\pip.exe

If you use a virtualenv whitelist/exclude those directories since those virtualenvs use a local copy of pip instead of the global one. That should fix avast messing with pip/virtualenv/pipenv



来源:https://stackoverflow.com/questions/63223306/avast-blocks-pip-and-pyinstaller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!