Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing UV with system python [follow up] #11389

Closed
Ben-Epstein opened this issue Feb 10, 2025 · 2 comments
Closed

Syncing UV with system python [follow up] #11389

Ben-Epstein opened this issue Feb 10, 2025 · 2 comments
Labels
question Asking for clarification or support

Comments

@Ben-Epstein
Copy link

Question

Similar to #6834 I am trying to use uv in CI to sync my lockfile with the system python.

I have a command like so
/bin/sh -c "UV_PROJECT_ENVIRONMENT=$(python -c \"import sysconfig; print(sysconfig.get_config_var('prefix'))\") uv sync" where the python command evaluates to

Using CPython 3.11.9
error: Project virtual environment directory `/usr/local` cannot be used because it is not a compatible environment but cannot be recreated because it is not a virtual environment

Is there any more detail as to what this means or how to debug it?

Thanks!

Platform

Ubuntu 22.04

Version

0.5.6

@Ben-Epstein Ben-Epstein added the question Asking for clarification or support label Feb 10, 2025
@zanieb
Copy link
Member

zanieb commented Feb 10, 2025

It's probably a Python version mismatch. What does your project require? Do you have a .python-version file?

#11227 tracks improving the error here.

@Ben-Epstein
Copy link
Author

that was exactly it, thanks @zanieb -- i'll close this one out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants