mirror of https://github.com/astral-sh/uv
For some reason, I'm encountering broken PBS venvs again (https://github.com/astral-sh/python-build-standalone/issues/380). Instead of showing the obscure error to the user, we point them to the PBS bug and ask them to run `uv venv`. ``` $ uv sync error: Querying Python at `/tmp/uv/tests/.tmpwXZRTI/temp/.venv/bin/python3` failed with exit status exit status: 1 [stderr] Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = '/tmp/uv/tests/.tmpwXZRTI/temp/.venv/bin/python3' isolated = 1 environment = 0 user site = 0 safe_path = 1 import site = 1 is in build tree = 0 stdlib dir = '/install/lib/python3.12' sys._base_executable = '/home/konsti/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin/python3.12' sys.base_prefix = '/install' sys.base_exec_prefix = '/install' sys.platlibdir = 'lib' sys.executable = '/tmp/uv/tests/.tmpwXZRTI/temp/.venv/bin/python3' sys.prefix = '/install' sys.exec_prefix = '/install' sys.path = [ '/install/lib/python312.zip', '/install/lib/python3.12', '/install/lib/python3.12/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x000078e48b835740 (most recent call first): <no Python frame> ``` ``` $ uv-debug sync error: Can't use Python at `/tmp/uv/tests/.tmpwXZRTI/temp/.venv/bin/python3` Caused by: Python is missing PYTHONHOME. If you are using a managed Python interpreter, this is a known bug (https://github.com/astral-sh/python-build-standalone/issues/380). You can recreate the virtual environment with `uv venv`. ``` |
||
|---|---|---|
| .. | ||
| python | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||
| build.rs | ||
| download-metadata.json | ||
| fetch-download-metadata.py | ||
README.md
uv-python
This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.7) is a component of uv 0.9.17. The source can be found here.
See uv's crate versioning policy for details on versioning.