# PEP 832: virtual environment discovery

**URL:** <https://discuss.python.org/t/pep-832-virtual-environment-discovery/106998>\
**Category:** PEPs\
**Created:** [April 15, 2026, 10:20pm UTC](https://discuss.python.org/t/pep-832-virtual-environment-discovery/106998 "2026-04-15T22:20:49Z")\
**Posts on this page:** 1\
**Showing post:** 159

<div class="post-metadata">

**Author:** ![kramkowski](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@kramkowski](https://discuss.python.org/u/kramkowski)\
**Post date:** [August 18, 2026, 11:53pm UTC](https://discuss.python.org/t/pep-832-virtual-environment-discovery/106998/159 "2026-08-18T23:53:22Z")

</div>

> [@brettcannon](#):
>
> > [@kramkowski](#):
> >
> > we think there are still important use cases for `.venv` as a “file which contains a path” rather than a symlink or junction, even in the presence of `.python-envs`.
> 
> Is “we” in that sentence “uv”, because the initial feedback I got from Zanie was they didn’t want the `.venv` redirect file. So has the uv perspective officially changed?

Yes, I am speaking for uv. I checked with Zanie and, from what we recall, our objection was to the “SHOULD” wording which made `.venv` something that tools were expected to provide. We have plans to allow users to opt out of maintaining a `.venv` altogether, as there are use cases where its presence causes problems for users. The current “MAY” wording makes it optional, which we’re happy with. We never had any fundamental objection to `.venv` being a file rather than a directory.

> [@brettcannon](#):
>
> > [@kramkowski](#):
> >
> > Would you consider including `.venv` as a redirect file (or something similar) in the PEP again?
> 
> If you can convince others, then sure. But I also don’t see why `.python-envs` prevents this? I can see why you now want the `.venv` redirect file as uv users already have `.venv` in their e.g., `.gitignore` file. But functionally I don’t see it as a drastic shift from `.python-envs` beyond any concern you have of some other tool deciding their environment is more important (e.g. Nox or Tox).

`.python-envs` is a shared list with no single owner. It may be trivial to add to it, but we can only reliably present users with a single uv-managed environment through this mechanism, the path to which may change depending on configuration. An environment we previously listed may still exist while no longer being kept in sync with the project, so we’d want to remove our old references to avoid confusion, without disturbing other tools’ entries. But not only is it more complex to mutate a shared file correctly, there are also a number of corner cases which mean we may have to guess which entries belong to us. That adds complexity and uncertainty that we would prefer to avoid.

The objections regarding multiple environments and other environment types, also listed in the rejection rationale, are addressed by `.python-envs`. But this does not appear incompatible with also allowing a `.venv` redirect file. Backwards compatibility remains a concern, but we would only want to create `.venv` as a file as a last resort when we cannot make a symlink or junction. If the PEP excludes that fallback, we cannot provide a conforming `.venv` in those cases. A tool that does not understand redirect files would not discover our environment through `.venv` in either case, but a redirect file at least tells the user where the environment is, so they can point the tool at it manually. A redirect file also makes a tool that does not understand it less likely to create a separate environment, avoiding what would probably be the most confusing outcome.

---

_[View the full topic](https://discuss.python.org/t/pep-832-virtual-environment-discovery/106998)._
