# Build fail due to pip install torch

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuild-fail-due-to-pip-install-torch%2F17387%3E%5C
**Category:** Spaces\
**Created:** [May 1, 2022, 12:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuild-fail-due-to-pip-install-torch%2F17387 "2022-05-01T12:38:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grapplerurlich](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/grapplerurlich/32/4644_2.png) [@grapplerurlich](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fgrapplerurlich)%5C
**Post date:** [May 1, 2022, 12:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuild-fail-due-to-pip-install-torch%2F17387%2F1 "2022-05-01T12:38:53Z")

</div>

I have `transformers[sentencepiece,torch]` in the `requriements.txt` file. When building the space, I get the error " The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 2".

The log has the following information.

```auto
Step 18/29 : RUN pip install -r requirements.txt
 ---> Running in 67069f0012d9
Defaulting to user installation because normal site-packages is not writeable
Collecting torch>=1.0
  Downloading torch-1.11.0-cp38-cp38-manylinux1_x86_64.whl (750.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 750.6/750.6 MB 171.1 MB/s eta 0:00:01
ERROR: Exception:
MemoryError

```

I am not sure what I can do to fix it.

Cheers!

---

<div class="post-metadata">

**Author:** ![nateraw](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nateraw/32/2556_2.png) [@nateraw](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnateraw)%5C
**Post date:** [May 7, 2022, 4:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbuild-fail-due-to-pip-install-torch%2F17387%2F2 "2022-05-07T04:57:18Z")

</div>

Hey there, I see that your space ended up building without the error 🙏 let me know if you run into the issue again…must have been a hiccup.
