uv
uv copied to clipboard
Group Policy Blocks UV Tool from Accessing Python Interpreter
Description:
I am encountering a persistent issue with the UV tool where it fails to access the Python interpreter due to a group policy restriction. This problem occurs not only when adding packages but also when running scripts.
Error Details:
-
Command:
uv add faker
anduv run src/uv_prj/__init__.py
-
Error Message:
error: Failed to query Python interpreter at `\\?\C:\Users\aarabil\Desktop\quick_runs\uv_prj\.venv\Scripts\python.exe` Caused by: This program is blocked by group policy. For more information, contact your system administrator. (os error 1260)
Steps to Reproduce:
- Create a new virtual environment using
uv
. - Attempt to add a package using
uv add faker
. - Attempt to run a script using
uv run src/uv_prj/__init__.py
.
Expected Behavior:
The UV tool should be able to add packages and run scripts without encountering errors related to the Python interpreter.
Actual Behavior:
Both operations fail with an error indicating that the Python interpreter is blocked by group policy.
Environment:
- OS: Windows
- UV Tool Version: 0.3.2 (c5440001c 2024-08-23) (installed with pip within a Conda env)
- Python Version: 3.12 (within a Conda env)
-
Virtual Environment Location:
C:\Users\aarabil\Desktop\quick_runs\uv_prj\.venv\
Additional Information:
The error suggests that the group policy settings on the system are preventing the UV tool from accessing the Python interpreter. I am wondering how others deal with this issue within a corporate environment?