Last active
May 13, 2020 07:38
-
-
Save mshRoR/913b1f5cb20a15f48f7189b8c64e5e3d to your computer and use it in GitHub Desktop.
python 3.7 | pip3 | pipenv | django 2.1 installing commands in ubuntu 16.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## python 3.7 install | |
-> sudo apt update | |
-> sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget | |
-> sudo apt install software-properties-common | |
-> sudo add-apt-repository ppa:deadsnakes/ppa | |
-> sudo apt update | |
-> sudo apt install python3.7 | |
-> python3.7 --version | |
## pip3 install | |
-> sudo apt-get -y install python3-pip | |
-> pip3 --version | |
## pipenv install | |
-> pip install --user pipenv | |
-> pip install --user --upgrade pipenv | |
## To create a new virtualenv, using a specific version of Python you have installed (and on your PATH), use the --python VERSION flag, like so: | |
-> mkdir myproject && cd myproject | |
-> pipenv --python 3.7 | |
## Install django 2.1 | |
-> pipenv install django==2.1 | |
-> pipenv shell # Acitve python virtualenv | |
-> django-admin startproject myproject_project . # install django-admin | |
-> python manage.py migrate | |
-> python manage.py runserver | |
##========= django apps create =========## | |
-> python manage.py startapp app_name # ex: python manage.py startapp books | |
-> python manage.py makemigrations app_name # ex: python manage.py makemigrations books (create books model migration files) | |
-> python manage.py migrate | |
-> python manage.py createsuperuser # create django-admin superuser | |
##========= djangorestframework ========## | |
-> pipenv install djangorestframework==3.8.2 | |
-> pipenv install django-cors-headers==2.4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python3.7:
-> https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/
pipenv:
-> https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv
-> https://pipenv.readthedocs.io/en/latest/basics/