You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

activate.bat 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @echo off
  2. rem This file is UTF-8 encoded, so we need to update the current code page while executing it
  3. for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do (
  4. set "_OLD_CODEPAGE=%%a"
  5. )
  6. if defined _OLD_CODEPAGE (
  7. "%SystemRoot%\System32\chcp.com" 65001 > nul
  8. )
  9. set "VIRTUAL_ENV=C:\Users\amer1\Desktop\python"
  10. if not defined PROMPT (
  11. set "PROMPT=$P$G"
  12. )
  13. if defined _OLD_VIRTUAL_PROMPT (
  14. set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
  15. )
  16. if defined _OLD_VIRTUAL_PYTHONHOME (
  17. set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
  18. )
  19. set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
  20. set "PROMPT=(python) %PROMPT%"
  21. if defined PYTHONHOME (
  22. set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
  23. set PYTHONHOME=
  24. )
  25. if defined _OLD_VIRTUAL_PATH (
  26. set "PATH=%_OLD_VIRTUAL_PATH%"
  27. ) else (
  28. set "_OLD_VIRTUAL_PATH=%PATH%"
  29. )
  30. set "PATH=%VIRTUAL_ENV%\Scripts;%PATH%"
  31. :END
  32. if defined _OLD_CODEPAGE (
  33. "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
  34. set "_OLD_CODEPAGE="
  35. )