Update Makefile (#150)

Work with pip from $PYTHON_INTERPRETER as recommended in 
https://packaging.python.org/guides/installing-using-pip-and-virtualenv/
This commit is contained in:
Unai Zulaika 2018-11-12 20:33:10 +01:00 committed by Peter Bull
parent d40ffb462d
commit b8e8e1af74
1 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@ endif
## Install Python Dependencies ## Install Python Dependencies
requirements: test_environment requirements: test_environment
pip install -U pip setuptools wheel $(PYTHON_INTERPRETER) -m pip install -U pip setuptools wheel
pip install -r requirements.txt $(PYTHON_INTERPRETER) -m pip install -r requirements.txt
## Make Dataset ## Make Dataset
data: requirements data: requirements
@ -65,7 +65,7 @@ else
endif endif
@echo ">>> New conda env created. Activate with:\nsource activate $(PROJECT_NAME)" @echo ">>> New conda env created. Activate with:\nsource activate $(PROJECT_NAME)"
else else
@pip install -q virtualenv virtualenvwrapper $(PYTHON_INTERPRETER) -m pip install -q virtualenv virtualenvwrapper
@echo ">>> Installing virtualenvwrapper if not already intalled.\nMake sure the following lines are in shell startup file\n\ @echo ">>> Installing virtualenvwrapper if not already intalled.\nMake sure the following lines are in shell startup file\n\
export WORKON_HOME=$$HOME/.virtualenvs\nexport PROJECT_HOME=$$HOME/Devel\nsource /usr/local/bin/virtualenvwrapper.sh\n" export WORKON_HOME=$$HOME/.virtualenvs\nexport PROJECT_HOME=$$HOME/Devel\nsource /usr/local/bin/virtualenvwrapper.sh\n"
@bash -c "source `which virtualenvwrapper.sh`;mkvirtualenv $(PROJECT_NAME) --python=$(PYTHON_INTERPRETER)" @bash -c "source `which virtualenvwrapper.sh`;mkvirtualenv $(PROJECT_NAME) --python=$(PYTHON_INTERPRETER)"