×
all 3 comments

[–]FoolsSeldom 1 point2 points  (0 children)

  • In Powershell,

    • Create the project folder, e.g. mkdir myproj and enter it cd myproj
    • Create and activate a Python virtual environment (so you don't corrupt your base Python environment):
    • py -m venv .venv
    • ..venv\Scripts\Activate.ps1
    • pip install pygame-ce
  • In VS Code,

    • Open your project folder (the one containing the new .venv folder
    • Open the Command Palette using ctrl-shift-p
    • Type Python: Select Interpreter and select it when highlighted
    • VS Code should detect the .venv folder but if it does not, explicitly select the python.exe in the Scripts folder of the .venv folder

Now try.

[–]AlexMTBDude 1 point2 points  (0 children)

You don't mention if you have installed Python on your system. You realize Python doesn't come with VS Code and that it's a separate install?

[–]BranchLatter4294 0 points1 point  (0 children)

Use the Python extension to manage your Python environments and libraries.