Answer the question
In order to leave comments, you need to log in
How to properly install python3 on debian?
Hello everyone, I'm trying to install a Django site on a VPS using this template
, I
'm installing python3 nginx systemd gunicorn git
sudo apt-get install python3 nginx systemd gunicorn git
git clone https://github.com/alexey-goloburdin/django-clean-template.git
cd django-clean-template
which python3
./install.sh: line 8: The: command not found
./install.sh: line 9: env/bin/activate: No such file or directory
./install.sh: line 10: pip: command not found
./install.sh: line 11: pip: command not found
Created symlink /etc/systemd/system/multi-user.target.wants/gunicorn.service → /root/rdjango-clean-template/systemd/gunicorn.service.
#!/bin/bash
base_python_interpreter=""
project_domain=""
project_path=`pwd`
read -p "Python interpreter: " base_python_interpreter
read -p "Your domain without protocol (for example, google.com): " project_domain
`$base_python_interpreter -m venv env`
source env/bin/activate
pip install -U pip
pip install -r requirements.txt
sed -i "s~dbms_template_path~$project_path~g" nginx/site.conf systemd/gunicorn.service
sed -i "s~dbms_template_domain~$project_domain~g" nginx/site.conf src/config/settings.py
sudo ln -s $project_path/nginx/site.conf /etc/nginx/sites-enabled/
sudo ln -s $project_path/systemd/gunicorn.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start gunicorn
sudo systemctl enable gunicorn
sudo service nginx restart
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question