on-internet
← Community

VSCode on macOS incorrectly formats Python file path when using "Run Python File in Terminal"

Stack Overflow ·

I'm using Visual Studio Code on macOS to run a simple Python script (practice.py) within an existing virtual environment (.venv). The virtual environment activates successfully, and I can run the script manually from the integrated terminal using: python practice.py However, when I use Run Python File in Terminal in VS Code, the script fails with a file path error. Terminal output (.venv) amelianorbury@amelias-mbp-6 NMOS % source "/Users/amelianorbury/Desktop/University/Year 4/Research and Development Project/Sentaurus/NMOS/.venv/bin/activate" (.venv) amelianorbury@amelias-mbp-6 NMOS % '/Users

Comments

Sign in or sign up to comment and upvote.

No comments yet.