windows下无法激活 python venv 虚拟环境 导致 pyinstaller 打包的程序找到不到module
pyinstaller 需要在虚拟环境下运行,打包的程序才不会出现找不到module的情况。
在 venv\Script 下运行 activate 激活不了虚拟环境,出现CategoryInfo : SecurityError: (😃 [],PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
解决方法是在项目终端下直接运行以下代码
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
参考:
1. CategoryInfo : SecurityError: (:) [],PSSecurityException + FullyQualifiedErrorId : Unau_三岁就很~酷~的博客-CSDN博客
2. pyinstaller 打包 提示 ModuleNotFoundError: No module named ‘xxx‘_bigcarp的博客-CSDN博客_modulenotfounderror pyinstaller
3. Python三方库:PyInstaller(exe程序打包) - 山上下了雪-bky - 博客园 (cnblogs.com)
posted on 2022-11-29 10:33 capitalismx 阅读(514) 评论(0) 收藏 举报
浙公网安备 33010602011771号