# EnvironmentError: Permission denied Using Python 3.7.4

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fenvironmenterror-permission-denied-using-python-3-7-4%2F42758%3E%5C
**Category:** Spaces\
**Created:** [June 10, 2023, 11:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fenvironmenterror-permission-denied-using-python-3-7-4%2F42758 "2023-06-10T11:19:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lou-k](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lou-k/32/16738_2.png) [@lou-k](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flou-k)%5C
**Post date:** [June 10, 2023, 11:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fenvironmenterror-permission-denied-using-python-3-7-4%2F42758%2F1 "2023-06-10T11:19:54Z")

</div>

I noticed that the python 3.7.4 container for building spaces fails due to a permission error when upgrading pip:

> **[TestSpace - a Hugging Face Space by lou-k](https://huggingface.co/spaces/lou-k/TestSpace?logs=build)**
>
> Discover amazing ML apps made by the community

Specifically, at the step:

```auto
--> RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1"
Collecting pip==22.3.1
  Downloading https://files.pythonhosted.org/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl (2.1MB)
Installing collected packages: pip
  Found existing installation: pip 19.3
    Uninstalling pip-19.3:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/bin/pip'

```

Any fix available? I know the 3.10 python containers are working, but I need 3.7 to support some legacy codebase I’d rather not update at the moment.

---

<div class="post-metadata">

**Author:** ![lou-k](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lou-k/32/16738_2.png) [@lou-k](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flou-k)%5C
**Post date:** [June 10, 2023, 11:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fenvironmenterror-permission-denied-using-python-3-7-4%2F42758%2F2 "2023-06-10T11:26:23Z")

</div>

FWIW I noticed this is happening on 3.7.5 as well, but not 3.7.16
