本文介绍了(venv)(base)都在python项目中处于活动状态,我如何仅进入venv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在将vscode与conda一起使用(用于django项目),并尝试激活名为"venv"的虚拟环境.它来自:

So I am using vscode with conda (for a django project), and trying to activate my virtual environment named "venv".And it goes from:

(base) C:\Users\User\Desktop\pfa-master\pfa-master\venv\Scripts> .\activate

类似这样:

(venv) (base) C:\Users\User\Desktop\pfa-master\pfa-master\venv\Scripts>

如果我尝试找出Python版本,它会显示如下错误:

And if I try to find out Python version, it shows error like this:

(venv) (base) C:\Users\User\Desktop\pfa-master\pfa-master>which python
'which' is not recognized as an internal or external command,
operable program or batch file.

注意:我在蟒蛇的环境变量中有Python.

Note: I have Python in environment variables for anaconda.

我在做什么错了?

推荐答案

如果您的环境PATH中有水蟒,请尝试 activate venv .另外,尝试重新启动有时会出现故障的VScode.

if you have anaconda in your environmental PATH, try activate venv. Also, try restarting VScode sometimes it glitches.

这篇关于(venv)(base)都在python项目中处于活动状态,我如何仅进入venv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 04:18