-
-
Notifications
You must be signed in to change notification settings - Fork 273
Installing on virtualenv (linux)
Shinebayar G edited this page Sep 3, 2019
·
3 revisions
- Install python virtualenv using (replace
aptwith your package manager)sudo apt install python3-venv - Create virtualenv named envname for python3 using
python3 -m venv any/path/envname - Enter to virtual env
source any/path/envname/bin/activate - Check python version using
python -V - Create a folder for script server and navigate to it
mkdir -p any/path/script-server && cd any/path/script-server - Download latest release
wget https://github.com/bugy/script-server/releases/latest/download/script-server.zip - Extract zip contents
unzip script-server.zip(If unzip command not found, install unzip withsudo apt-get install unzip) - Install requirements
pip install -r requirements.txt - Run the server
python launcher.py
Bonus: If using virtualenv's python, then systemd startup script python path would be:
- Find out virtualenv's python path (When virtualenv is activated)
which pythoncopy result - Edit
/lib/systemd/system/script-server.serviceExecStart=/usr/bin/python3would be ->paste hereExample something like this:/home/user/script-server/envname/bin/python
The similar change should be done for init.d