When using vagrant, vscode won't be able to map to the vm, well not yet anyway. A way around this is to checkout a branch called pipenv, run pipenv --python 3
to create a virtual environment. Then run pipenv install -r requirements.txt
to install everything in the project.
After doing this, in vscode ctrl+p
then search for >python: select interpreter
. Select the virtual env python, it will look something like this: /home/yourname/.local/share/virtualenvs/project-foo-JbRjzqlX/bin/python
.
Just don't commit the pipenv stuff.
Place the following in .git/hooks/pre-commit