filmov
tv
Setup VS Code for Python with Pyenv and Poetry
![preview_player](https://i.ytimg.com/vi/547Jr26duHQ/maxresdefault.jpg)
Показать описание
Before diving into Programming, Test Automation, Machine Learning, and other awesome things you can do with Python, you need to setup your machine and IDE properly.
In this video, I go over my preferred Python setup using pyenv as my interpreter manager, poetry as my package manager, and VS Code as my IDE. The rest of my Python videos (from now on) will most likely be using this setup, so it's good to know how to follow along.
Steps
----------
* If on Mac, use $ brew install pyenv
* Install a Python interpreter, like $ pyenv install 3.8.6
* Set it globally with $ pyenv global 3.8.6
* $ pip install poetry
3. Start the Project
* Install Python and Pylance Extensions
* Initialize your Python Project (with $ poetry init) and follow the guide
* $ poetry install
* $ poetry add [PACKAGE] to install any additional packages
* Find the virtual environment path that poetry created (with $ poetry env info)
* Open Command Palette, then Python: Select Interpreter
* If you followed along in the video, we installed pyleniumio which comes with pytest, so now we open the Command Palette again, then Python: Configure Tests
* OPTIONAL - Configure Linter and Formatter, or just use Pylance's built-in functionality
In this video, I go over my preferred Python setup using pyenv as my interpreter manager, poetry as my package manager, and VS Code as my IDE. The rest of my Python videos (from now on) will most likely be using this setup, so it's good to know how to follow along.
Steps
----------
* If on Mac, use $ brew install pyenv
* Install a Python interpreter, like $ pyenv install 3.8.6
* Set it globally with $ pyenv global 3.8.6
* $ pip install poetry
3. Start the Project
* Install Python and Pylance Extensions
* Initialize your Python Project (with $ poetry init) and follow the guide
* $ poetry install
* $ poetry add [PACKAGE] to install any additional packages
* Find the virtual environment path that poetry created (with $ poetry env info)
* Open Command Palette, then Python: Select Interpreter
* If you followed along in the video, we installed pyleniumio which comes with pytest, so now we open the Command Palette again, then Python: Configure Tests
* OPTIONAL - Configure Linter and Formatter, or just use Pylance's built-in functionality
Комментарии