Last active
March 21, 2019 16:51
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: 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