# GH Python3 'site-envs' life-cycle behavior?

**URL:** <https://discourse.mcneel.com/t/gh-python3-site-envs-life-cycle-behavior/182642>\
**Category:** Scripting\
**Tags:** mac, grasshopperrhino, python3\
**Created:** [May 23, 2024, 12:31pm UTC](https://discourse.mcneel.com/t/gh-python3-site-envs-life-cycle-behavior/182642 "2024-05-23T12:31:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed.p.may](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ed.p.may/32/775152_2.png) [@ed.p.may](https://discourse.mcneel.com/u/ed.p.may)\
**Post date:** [May 23, 2024, 12:31pm UTC](https://discourse.mcneel.com/t/gh-python3-site-envs-life-cycle-behavior/182642/1 "2024-05-23T12:31:43Z")

</div>

Hi,

I am starting to dip a toe into the new RH-8 Python3 components in Grasshopper. I wonder if there is some documentation regarding how the interpreter will behave that I might refer to as I try and understand this new system? Specifically, I am wondering about the use of the `site-env` folders for dependencies?

I understand that when the user creates a new PY3 script and add the `# r: ...` to it, GH will install packages via PyPi, which is great and seems to work well. And from my tests, I understand that these dependencies are installed in temporary (?) directories within `.rhinocode/py39-rh8/site-env` (yes?). Just from noodling around, it appears that there are separate directories which are created for Grasshopper script components vs. native Rhino python scripts, yes?

So my question is: how should we expect these directories to behave over time? Meaning - they appear to be temporary (random string name?) but are they? Will they be removed / cleaned out at some point in the application life-cycle? Do they get updated or removed periodically? Or should we expect that once created the first time, they will remain on the user’s install with the same name/location? Will there ever be more than one GH and one RH directory created?

Thanks!  
@ed.p.may

---

<div class="post-metadata">

**Author:** ![Thomas\_Geoghegan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/thomas_geoghegan/32/508747_2.png) [@Thomas\_Geoghegan](https://discourse.mcneel.com/u/Thomas_Geoghegan)\
**Post date:** [April 8, 2025, 9:06pm UTC](https://discourse.mcneel.com/t/gh-python3-site-envs-life-cycle-behavior/182642/2 "2025-04-08T21:06:12Z")

</div>

I have the same question
