davidmarble / virtualenvwrapper-win

Port of Doug Hellmann's virtualenvwrapper to Windows batch scripts
Other
461 stars 106 forks source link

workon <envName> not activating enviornment #108

Closed suraj-ingle closed 4 years ago

suraj-ingle commented 4 years ago

this is what I have done.

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

C:\Users\hp>workon djangoEnv
C:\Users\hp>

(djangoEnv) is not appearing before the current directory Please note that I have installed Python3.7 in E:\ instead of C:\

Here are the Path variables i have:

C:\Users\hp>path
PATH=C:\Users\hp\Envs\djangoEnv\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;E:\Matlab\runtime\win64;E:\Matlab\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;E:\Python3\Scripts;E:\Python3;C:\Users\hp\AppData\Local\Programs\Python\Python37\Scripts; 
c-poole commented 4 years ago

I'm experiencing a similar issue but it is actually activating the environment, just not giving the environment name before the prompt. Run pip list before and after activating/deactivating an environment or try

python
import sys
sys.path

Both of these should return different results if the environments are being activated/deactivated.

thebjorn commented 4 years ago

This is fixed in version 1.2.6 (see #107) for details.