Difference between revisions of "Python Environment Setup"
Jump to navigation
Jump to search
| Line 5: | Line 5: | ||
==Set VS Code to Use the New PC Environment== | ==Set VS Code to Use the New PC Environment== | ||
* You must tell VS Code on your PC to use this specific folder instead of the one from your Mac: | * You must tell VS Code on your PC to use this specific folder instead of the one from your Mac: | ||
**Press Ctrl + Shift + P to open the Command Palette. | **Press<code> Ctrl + Shift + P</code> to open the Command Palette. | ||
*Type and select Python: Select Interpreter. | *Type and select Python: Select Interpreter. | ||
*Choose the one that points to your new folder: <code>('.venv_pc': venv).</code> | *Choose the one that points to your new folder: <code>('.venv_pc': venv).</code> | ||
If it doesn't appear, select Enter interpreter path... and browse to .venv_pc\Scripts\python.exe. | If it doesn't appear, select Enter interpreter path... and browse to .venv_pc\Scripts\python.exe. | ||
Revision as of 16:21, 5 January 2026
Create the Environment with a Unique Name
- Instead of the generic .venv, give your Windows environment a name that clearly identifies it. In your project's root terminal, run:
python -m venv .venv_pc
- This creates a new folder named
.venv_pcin your project. Your existing Mac folder(e.g., .venv or .venv_mac)will remain completely untouched.
Set VS Code to Use the New PC Environment
- You must tell VS Code on your PC to use this specific folder instead of the one from your Mac:
- Press
Ctrl + Shift + Pto open the Command Palette.
- Press
- Type and select Python: Select Interpreter.
- Choose the one that points to your new folder:
('.venv_pc': venv).
If it doesn't appear, select Enter interpreter path... and browse to .venv_pc\Scripts\python.exe.