Skip to content

Instantly share code, notes, and snippets.

@vlad-bezden
Last active March 21, 2019 16:51
Show Gist options
  • Save vlad-bezden/83fc326c54f054eaf9b0deed0c2cb19a to your computer and use it in GitHub Desktop.
Save vlad-bezden/83fc326c54f054eaf9b0deed0c2cb19a to your computer and use it in GitHub Desktop.
New Python project setup files, virtual environment (venv), activate venv, install required library and open VS Code on Windows platform
: create virtual environment
python -m venv ./venv
: create activate.bat file
echo .\venv\scripts\activate.bat > activate.bat
: activate virtual env
call activate.bat
: update pip
python -m pip install -U pip
: create requirements file
(
echo flake8
echo black
echo rope
) > requirements.txt
: install requirements
pip install -r requirements.txt
: add .gitignore file
(
echo **/venv
) > .gitignore
: add src directory
md src
: add .env file
echo PYTHONPATH=%cd% > .env
: open VS Code
code .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment