windows cmd not showing python virtualenvwrapper in front of the command
Asked Answered
R

2

7

I'm try to use "virtualenvwrapper-win" to build django project on my windows 10 pc. I think i setup it correctly, and it seems work fine. but I can't see what virtual environment am i using right now. it doesn't show in front of the command line. But on my laptop, i can see it correctly.

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>

Above is the command line on my pc. I think i activate virtual environment correctly, but it didn't show what environment in the front. like below:

(my_django) C:\Users\User>
Reprise answered 12/2, 2020 at 1:57 Comment(0)
A
2

It is because of the new version 20.0.1 which doesn't show that, don't know whether its bug or not,the activate command does activate it, but it no visible. Solution, uninstall and install last stable release

pip install virtualenv==16.7.9
Allium answered 12/2, 2020 at 11:49 Comment(3)
It really works, after i change my "virtualenv" to version 16.7.9. Thanks a lot of your help! it bothers me like whole night.Reprise
Not sure about others, but even after doing this, it still doesn't work for me. Oddly, if I try activating the virtual environment in PowerShell, it does show the virtual environment prefix, though.Irvinirvine
If virtual environment prefix is coming, what is the issue? Packages are are not installing?Allium
F
1

use the --prompt command line option.

eg.

virtualenv newenvironmentname --prompt "(newenvironmentname)"  

or be even more clever...

virtualenv newenvironmentname --prompt "(here's the new environment)"  
Frozen answered 9/4, 2020 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.