# Installing python package on gadi

**URL:** <https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906>\
**Category:** Technical\
**Tags:** python\
**Created:** [14 November 2024 00:46 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906 "2024-11-14T00:46:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![polinash](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/polinash/32/3258_2.png) [@polinash](https://forum.access-hive.org.au/u/polinash)\
**Post date:** [14 November 2024 00:46 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906/1 "2024-11-14T00:46:11Z")

</div>

Hi all,

I’m trying to install a Python package in my home directory on Gadi (`/home/156/ps7863/python_packages`). However, Gadi says I don’t have permission to do so:

```auto
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
  environment location: /g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04
  uid: 18195
  gid: 4334

```

Is there a workaround for this? Should I create my own Conda environment? I’d prefer to avoid this if possible, so I don’t need to activate it every time I use the package…

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [14 November 2024 01:05 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906/2 "2024-11-14T01:05:06Z")

</div>

I generally would use this:

```auto
pip install --user <package>

```

---

<div class="post-metadata">

**Author:** ![polinash](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/polinash/32/3258_2.png) [@polinash](https://forum.access-hive.org.au/u/polinash)\
**Post date:** [14 November 2024 01:14 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906/4 "2024-11-14T01:14:31Z")

</div>

Thanks, Dave, that worked. I didn’t specify --user when I first tried to install the package.

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [14 November 2024 01:19 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906/5 "2024-11-14T01:19:39Z")

</div>

Although @dkhutch’s approach works, it’s not always the recommended approach.  
More info [here](https://coecms.github.io/posts/2024-06-05-mixing-python-envs.html?highlight=conda#pip-install-user):

> The downside with this approach is that it can lead to problems in the future. First of all, everything will be installed in your `/home` directory, which has a small quota and can easily be filled by local `pip` installations.

In the long-term, I would switch to using [python virtual environments](https://coecms.github.io/posts/2024-06-05-mixing-python-envs.html?highlight=conda#virtual-environments) instead.

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [14 November 2024 01:27 UTC](https://forum.access-hive.org.au/t/installing-python-package-on-gadi/3906/6 "2024-11-14T01:27:45Z")

</div>


