Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. ## Setup Virtual Environment
  2.  
  3. - Install Virtual Environment
  4. ```
  5. pip install virtualenv
  6. ```
  7. - Test the installation
  8. ```
  9. export PATH=$PATH:/home/chankruze/.local/bin
  10. virtualenv --version
  11. ```
  12. - Create A Virtual Environment
  13. ```
  14. virtualenv venv_name
  15. ```
  16. - Specify python interpreter
  17. ```
  18. virtualenv -p /usr/bin/python3 venv_name
  19. ```
  20. - Activate Virtual Environment
  21. ```
  22. source venv_name/bin/activate
  23. ```
  24.  
  25. ## Setup Django
  26.  
  27. - Install Django
  28. ```
  29. pip install Django==2.2
  30. ```
  31. - Verify Installation
  32. ```
  33. >>> import django
  34. >>> print(django.get_version())
  35. 2.2
  36. ```
  37. or
  38. ```
  39. python -m django --version
  40. ```
  41. - Deactiave env
  42. ```
  43. deactivate
  44. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement