Strange behaviour with UV and VSCode /u/akaBrotherNature Python Education

I have two pcs that are synced via google drive.

I created a python script on PC 1 using VSCode and using UV to create and manage a virtual environment.

The code runs fine on PC 1 using VSCode (which picks up the .venv folder and uses it).

The code runs fine on PC 1 using uv run code.py

It also runs fine on PC 2 using uv run code.py

But it does not run properly on PC 2 when using VSCode. The .venv folder is not detected.

The code also does not run if I use uv run code.py in the VSCode terminal, and I get this error:

error: Querying Python at `\?C:UsersUsernameMy DriveDocumentsMy Appsplex_power_state_stuff.venvScriptspython.exe` failed with exit status exit code: 103 --- stdout: --- stderr: did not find executable at 'C:UsersUsernameAppDataRoaminguvpythoncpython-3.13.1-windows-x86_64-nonepython.exe': The system cannot find the path specified. --- 

Any ideas? Thank you in advance!

submitted by /u/akaBrotherNature
[link] [comments]

​r/learnpython I have two pcs that are synced via google drive. I created a python script on PC 1 using VSCode and using UV to create and manage a virtual environment. The code runs fine on PC 1 using VSCode (which picks up the .venv folder and uses it). The code runs fine on PC 1 using uv run code.py It also runs fine on PC 2 using uv run code.py But it does not run properly on PC 2 when using VSCode. The .venv folder is not detected. The code also does not run if I use uv run code.py in the VSCode terminal, and I get this error: error: Querying Python at `\?C:UsersUsernameMy DriveDocumentsMy Appsplex_power_state_stuff.venvScriptspython.exe` failed with exit status exit code: 103 — stdout: — stderr: did not find executable at ‘C:UsersUsernameAppDataRoaminguvpythoncpython-3.13.1-windows-x86_64-nonepython.exe’: The system cannot find the path specified. — Any ideas? Thank you in advance! submitted by /u/akaBrotherNature [link] [comments] 

I have two pcs that are synced via google drive.

I created a python script on PC 1 using VSCode and using UV to create and manage a virtual environment.

The code runs fine on PC 1 using VSCode (which picks up the .venv folder and uses it).

The code runs fine on PC 1 using uv run code.py

It also runs fine on PC 2 using uv run code.py

But it does not run properly on PC 2 when using VSCode. The .venv folder is not detected.

The code also does not run if I use uv run code.py in the VSCode terminal, and I get this error:

error: Querying Python at `\?C:UsersUsernameMy DriveDocumentsMy Appsplex_power_state_stuff.venvScriptspython.exe` failed with exit status exit code: 103 --- stdout: --- stderr: did not find executable at 'C:UsersUsernameAppDataRoaminguvpythoncpython-3.13.1-windows-x86_64-nonepython.exe': The system cannot find the path specified. --- 

Any ideas? Thank you in advance!

submitted by /u/akaBrotherNature
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *