Skip to content

Commit

Permalink
Check for python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
makseq committed Aug 7, 2019
1 parent 8a08c8f commit c32efa7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ part.

## Linux & Ubuntu guide

1 Install python and virtualenv
1 Install python and virtualenv. We recommend to use python 3, but probably python 2 solution will work too.
```
apt install python3.6
pip3 install virtualenv
Expand Down
18 changes: 12 additions & 6 deletions backend/start.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env bash
virtualenv -p python3 env3
source env3/bin/activate
pip install -r requirements.txt
python server.py
if command -v python3 &>/dev/null; then

echo "Server started"
echo "Go to http://localhost:8200"
virtualenv -p python3 env3
source env3/bin/activate
pip install -r requirements.txt
python server.py

echo "Server started"
echo "Go to http://localhost:8200"

else
echo "Python 3 is not installed. Or you can try patch this script to Python 2 (change python3 to python2)"
fi

0 comments on commit c32efa7

Please sign in to comment.