📜  如何知道我是否在虚拟环境中 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:33.375000             🧑  作者: Mango

代码示例1
import sys
sys.prefix == sys.base_prefix
# if true, you are not in a virtual env