Guest User

Untitled

a guest
Jun 8th, 2022
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. @echo off
  2. REM Batch command to easily invoke the pip install/ uninstall function.
  3. REM User can quickly install the required python module by just entering the module name
  4. REM Runs on Windows
  5.  
  6. :start
  7. cls
  8. echo.
  9. echo.
  10. echo Select menu
  11. echo ================
  12. echo 1. Display python modules being installed using pip function
  13. echo 2. Pip installation (individual files)
  14. echo 3. Pip uninstall
  15. echo.
  16.  
  17. REM set the python version here
  18. set python_ver=
  19.  
  20. set /p x=Pick:
  21. IF '%x%' == '1' GOTO NUM_1
  22. IF '%x%' == '2' GOTO NUM_2
  23. IF '%x%' == '3' GOTO NUM_3
  24. GOTO start
  25.  
  26. :NUM_1
  27. cd \
  28. cd \python%python_ver%\Scripts\
  29. pip freeze
  30. pause
  31. exit
  32.  
  33. :NUM_2
  34. echo Enter a filename to start install using pip
  35. set INPUT=
  36. set /P INPUT=Type input:%=%
  37.  
  38. cd \
  39. cd \python%python_ver%\Scripts\
  40. pip install %INPUT%
  41.  
  42. pause
  43. exit
  44.  
  45. :NUM_3
  46. echo Enter a filename to UNINSTALL using pip
  47. set INPUT=
  48. set /P INPUT=Type input:%=%
  49.  
  50. cd \
  51. cd \python%python_ver%\Scripts\
  52. pip uninstall %INPUT%
  53.  
  54. pause
  55. exit
Advertisement
Add Comment
Please, Sign In to add comment