$ mkvirtualenv -p /usr/bin/python3.5 readit
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /home/user1/.virtualenvs/readit/bin/python3.5
Also creating executable in /home/user1/.virtualenvs/readit/bin/python
To stop working on the virtual environment, use the deactivate command.
To start working on the virtual environment, use the workon <project> command.
Install python3-pip and pip2pi. Become root first for pip2pi.
apt install python3-pip
sudo su -
pip3 install pip2pi
Create a local pip directory /opt/pip. Download pip packages to this directory and run dir2pi. Finally, copy /opt/pip to /var/www/html/ for web hosting.
Move into the project directory and create a project.
$ cd django-projects/
$ django-admin startproject readit
Starting the development environment
Since django was installed using pip without root privileges, we can't start the development server using sudo nor on a port number that's lower than 1024. For production web server, run using uWSGI and nginx.
(readit) user@10-150-139-250:~/django-projects/readit$ python manage.py runserver 0.0.0.0:8000
Performing system checks...
System check identified no issues (0 silenced).
July 31, 2018 - 02:14:12
Django version 2.0.7, using settings 'readit.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.