# PEP 668: Marking Python base environments as "externally managed"

**URL:** <https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302>\
**Category:** Standards\
**Created:** [August 24, 2021, 2:50pm UTC](https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302 "2021-08-24T14:50:49Z")\
**Posts on this page:** 1\
**Showing post:** 46

<div class="post-metadata">

**Author:** ![hroncok](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hroncok/32/18696_2.png) [@hroncok](https://discuss.python.org/u/hroncok)\
**Post date:** [October 7, 2022, 11:42am UTC](https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302/46 "2022-10-07T11:42:05Z")

</div>

Thanks folks!

I am going to try to implement this in Fedora 38.

There is one bit of the spec I don’t fully understand, but maybe I have missed this somewhere else in the PEP. I’m trying to follow the recommendation for the distros. tl;dr I want `pip` to install to `/usr/local/lib(64)/python3.X/site-packages` for the users, but RPM to install to `/usr/lib(64)/python3.X/site-packages`. We currently do this already, but we use the same syconfig installation scheme – I understand that we will need to change that to have two schemes and I accept that.

To follow the specification, we will put the `EXTERNALLY-MANAGED` marker file to `/usr/lib(64)/python3.X/` because that is what `sysconfig.get_path("stdlib", sysconfig.get_default_scheme())` returns.

However, for the new installation scheme that uses `/usr/local/lib(64)/python3.X/site-packages`, `stdlib` is still located at `/usr/lib(64)/python3.X` – there is no stdlib in `/usr/local/lib(64)/python3.X`. How do we make the marker not affect installations to `/usr/local/lib(64)/python3.X/site-packages`?

---

_[View the full topic](https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302)._
