简体   繁体   English

当一个模块在虚拟环境中被卸载时,它是否仍然在 virtualenv 之外被卸载?

[英]When a module is uninstalled on a virtual environment, does it remain uninstalled outside the virtualenv?

I have numpy 1.16 installed due to it being listed as the specific version that ought to be used for a program to function properly.我安装了 numpy 1.16,因为它被列为应该用于 function 的程序的特定版本。 After installing numpy 1.19 in a virtual environment, I noticed the following messages:在虚拟环境中安装 numpy 1.19 后,我注意到以下消息:

Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.16.6
Uninstalling numpy-1.16.6:
Successfully uninstalled numpy-1.16.6

Will numpy 1.16 remain when I deactivate the virtual environment or will I have to reinstall it with pip once I finish using version 1.19?当我停用虚拟环境时,numpy 1.16 是否会保留,还是在我使用完 1.19 版后必须使用 pip 重新安装它?

Thank you.谢谢你。

If you installed numpy 1.16 for a specific virtual environment and replaced it with 1.9 it will not be there in the virtual environment but you will not need pip install for future use in other projects.如果您为特定虚拟环境安装了 numpy 1.16 并将其替换为 1.9,它将不会出现在虚拟环境中,但您不需要安装 pip 以供将来在其他项目中使用。

Which means it will not be uninstalled outside of the virtualenv.这意味着它不会在 virtualenv 之外被卸载。

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

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