-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pip
falls back to the global environment when it’s not installed in the uv
virtual environment
#6593
Comments
We don't install You can run |
Thanks for the swift reply & clarification. In that case it might be helpful to include a warning message:
This would guard against unintentional global installations (e.g. accidentally forgetting to type |
@FBen3 Note: I have not done any code-level research on UV. My contributions have been limited to simple documentation patches. |
We're not really comfortable providing a shim for If anything, this sounds like a pip issue? It should warn when being used in a virtual environment it's not installed in? |
If shim is inconvenient other options could be:
I agree with you that However, the core problem here is that |
I think the solution to this is
|
I am working on the Railway platform or deploying my X AI agent by using the LLM and I get this error- ✕ [stage-0 6/10] RUN --mount=type=cache,id=s/1eb2a6cc-50a7-4973-af90-a13857d8257a-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt Anybody knew, how to solve this problem. |
@HasanZaigam Please don't bump old issues or ping a bunch of people. See #9452. I can't tell you what's wrong without more information — there's no output there? It also looks like you're not even using uv? |
platform:
macOS Sonoma
uv version:
uv 0.3.1 (be17d132a 2024-08-21)
reproduce:
Can someone clarify whether this is intended behaviour?
I would expect the virtual environments to be isolated. If
pip
isn’t installed, trying to use it should either fail outright or provide a clear message thatpip
isn’t available, instead of silently falling back to the global environment. This would improve user experience and prevent mistakenly polluting the global environment.The text was updated successfully, but these errors were encountered: