DaSE-Computer-Vision-2021
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
487 B

#!/bin/bash
# what real Python executable to use
#PYVER=2.7
#PATHTOPYTHON=/usr/local/bin/
#PYTHON=${PATHTOPYTHON}python${PYVER}
PYTHON=$(which $(readlink .env/bin/python)) # only works with python3
# find the root of the virtualenv, it should be the parent of the dir this script is in
ENV=`$PYTHON -c "import os; print(os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..')))"`
# now run Python with the virtualenv set as Python's HOME
export PYTHONHOME=$ENV
exec $PYTHON "$@"