Article directory
set interpreter
If you are like me, using the pipenv virtual environment, when we switch to using vscode to run the code, an error will be reported, and the corresponding package cannot be found. At this time, we make the following settings
- Use the shortcut key
Ctrl + Shift +P
to open the command input box, search in the input box解释器 或 interpreter
, and then selectpython解释器
, as shown in the figure below
- Then there will be corresponding
pipenv虚拟环境
ones for you to choose (these are the ones I created in pycharm earlier), as shown below
- Just choose the environment you need!
- Plugins can also be installed
Python Environment Manager
to manage our virtual environment