Look down in left corner(mouse over or click) of VSCode,then you see which python version/interpreter it use now.
So most match version used to install this from command line.
Quick demo.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
C:\code
λ python - V
Python 3.8 . 3
C:\code
λ pip - V
pip 20.2 . 3 from c:\python38\lib\site - packages\pip (python 3.8 )
C:\code
λ pip install pyautogui - - upgrade
Collecting pyautogui
Downloading PyAutoGUI - 0.9 . 52.tar .gz ( 55 kB) .....
Successfully installed PyTweening - 1.0 . 3 mouseinfo - 0.1 . 3 pyautogui - 0.9 . 52
pygetwindow - 0.0 . 9 pymsgbox - 1.0 . 9 pyperclip - 1.8 . 1 pyrect - 0.1 . 4 pyscreeze - 0.1 . 26
|
So now i know that
Python 3.8
most be used as interpretee down in left corner VSCode.
If take mouse over it will show path
c:\python38
,the same path that
pip -V
show.
Some more install/setup tips here
VS Code from start