windows cmd 未在命令前显示 python virtualenvwrapper

Han*_*sen 6 python virtualenv virtualenvwrapper virtual-environment

我尝试使用“virtualenvwrapper-win”在我的 Windows 10 pc 上构建 django 项目。我认为我正确设置了它,它似乎工作正常。但我看不到我现在使用的是什么虚拟环境。它不会显示在命令行前面。但是在我的笔记本电脑上,我可以正确地看到它。

C:\Users\User>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================

C:\Users\User>mkvirtualenv my_django
created virtual environment CPython3Windows(dest=C:\Users\User\Envs\my_django, clear=False, global=False) with seeder FromAppData pip=latest setuptools=latest wheel=latest app_data_dir=C:\Users\User\AppData\Local\pypa\virtualenv\seed-v1 via=copy

C:\Users\User>workon

Pass a name to activate one of the following virtualenvs:
==============================================================================
my_django

C:\Users\User>workon my_django
C:\Users\User>cdvirtualenv
C:\Users\User\Envs\my_django>
Run Code Online (Sandbox Code Playgroud)

以上是我电脑上的命令行。我想我正确激活了虚拟环境,但它没有显示前面是什么环境。像下面这样:

(my_django) C:\Users\User>
Run Code Online (Sandbox Code Playgroud)

Aja*_*rge 2

是因为新版本20.0.1没有显示,不知道是不是bug,activate命令确实激活了,但是不可见。 解决方案,卸载并安装最后一个稳定版本

pip install virtualenv==16.7.9
Run Code Online (Sandbox Code Playgroud)