# Build error exit code: 1

**URL:** <https://discuss.huggingface.co/t/build-error-exit-code-1/41520>\
**Category:** Spaces\
**Created:** [May 30, 2023, 5:14pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520 "2023-05-30T17:14:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ececet](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ececet/32/20857_2.png) [@ececet](https://discuss.huggingface.co/u/ececet)\
**Post date:** [May 30, 2023, 5:14pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/1 "2023-05-30T17:14:48Z")

</div>

Hi,  
I am experiencing build error with exit code 1. I also have this in the log:

```auto
Collecting click==8.1.3
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 419.4 MB/s eta 0:00:00
Collecting conda==4.3.16
  Downloading conda-4.3.16.tar.gz (299 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 299.3/299.3 kB 473.4 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      
      WARNING: Your current install method for conda only supports conda
      as a python library. You are not installing a conda executable command
      or activate/deactivate commands. If your intention is to install conda
      as a standalone application, currently supported install methods include
      the Anaconda installer and the miniconda installer. If you'd still like
      for setup.py to create entry points for you, use `utils/setup-testing.py`.
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-dqw87lg7/conda_40d56a1b6bbc420da5481ee4bfa06dd2/setup.py", line 35, in <module>
          import conda._vendor.auxlib.packaging # NOQA
        File "/tmp/pip-install-dqw87lg7/conda_40d56a1b6bbc420da5481ee4bfa06dd2/conda/ __init__.py", line 13, in <module>
          from .common.compat import iteritems, text_type
        File "/tmp/pip-install-dqw87lg7/conda_40d56a1b6bbc420da5481ee4bfa06dd2/conda/common/compat.py", line 77, in <module>
          from collections import Iterable
      ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/ __init__.py)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: python -m pip install --upgrade pip

--> ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

```

I am not sure what this means. I have been training models, restarting the Space several times today. Have not seen this issue before. ☹  
Does anyone know how to fix this?

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [May 30, 2023, 5:29pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/2 "2023-05-30T17:29:00Z")

</div>

Hello @ececet,  
Can you please share a link to your application and let us see the requirements and so forth?

---

<div class="post-metadata">

**Author:** ![ececet](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ececet/32/20857_2.png) [@ececet](https://discuss.huggingface.co/u/ececet)\
**Post date:** [May 30, 2023, 5:43pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/3 "2023-05-30T17:43:49Z")

</div>

Hello @merve 🙂 I am unfortunately not allowed to share my application because it must remain private. However I can share my `requirements.txt` and `app.py`.

```auto
absl-py==1.4.0
aiohttp==3.8.4
aiosignal==1.3.1
appnope==0.1.3
asttokens==2.2.1
async-timeout==4.0.2
attrs==22.2.0
backcall==0.2.0
blis==0.7.9
boto3==1.26.91
botocore==1.29.91
brotlipy==0.7.0
cachetools==5.3.0
catalogue==2.0.8
certifi==2021.10.8
click==8.1.3
conda==4.3.16
confection==0.0.4
contourpy==1.0.7
cycler==0.11.0
cymem==2.0.7
datasets==2.10.1
decorator==5.1.1
dill==0.3.6
evaluate==0.4.0
executing==1.2.0
filelock==3.9.1
fonttools==4.39.0
frozenlist==1.3.3
fsspec==2023.3.0
gensim==4.3.1
google-auth==2.16.2
google-auth-oauthlib==0.4.6
greenlet==2.0.2
grpcio==1.51.3
huggingface-hub==0.13.2
importlib-metadata==6.1.0
importlib-resources==5.12.0
ipython==8.11.0
jedi==0.18.2
Jinja2==3.1.2
jmespath==1.0.1
joblib==1.2.0
kiwisolver==1.4.4
langcodes==3.3.0
Markdown==3.4.1
MarkupSafe==2.1.2
matplotlib==3.7.1
matplotlib-inline==0.1.6
multidict==6.0.4
multiprocess==0.70.14
murmurhash==1.0.9
nltk==3.8.1
numpy==1.24.2
oauthlib==3.2.2
packaging==23.0
pandas==1.5.3
parso==0.8.3
pathy==0.10.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.4.0
preshed==3.0.8
prompt-toolkit==3.0.38
protobuf==4.22.1
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==11.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycosat==0.6.3
pydantic==1.10.6
Pygments==2.14.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2022.7.1
PyYAML==6.0
regex==2022.10.31
requests-oauthlib==1.3.1
responses==0.18.0
rsa==4.9
s3transfer==0.6.0
scikit-learn==1.2.2
scipy==1.10.1
sentence-transformers==2.2.2
sentencepiece==0.1.97
setfit==0.6.0
smart-open==6.3.0
spacy==3.5.1
spacy-legacy==3.0.12
spacy-loggers==1.0.4
SQLAlchemy==2.0.6
srsly==2.4.6
stack-data==0.6.2
tensorboard==2.12.0
tensorboard-data-server==0.7.0
tensorboard-plugin-wit==1.8.1
thinc==8.1.9
threadpoolctl==3.1.0
tokenizers==0.13.2

--extra-index-url https://download.pytorch.org/whl/cu113
torch==1.13.1
torchvision==0.14.1

traitlets==5.9.0
transformers==4.26.1
typer==0.7.0
typing_extensions==4.5.0
wasabi==1.1.1
wcwidth==0.2.6
Werkzeug==2.2.3
xxhash==3.2.0
yarl==1.8.2
zipp==3.15.0

altair<5
catboost

```

The app looks like this:

```auto
import streamlit as st
from huggingface_hub import Repository
import os
from argparse import ArgumentParser

import torch
torch.cuda.empty_cache()
from run_bert import run_bert, get_datasets, report_gpu

if __name__ == " __main__":
    models_list = ["ltg/norbert2", "ltg/norbert"]

    test_params = [("ltg/norbert2", 128, 256, 0.001), ("ltg/norbert2", 256, 256, 0.001), ("ltg/norbert2", 320, 256, 0.001),
                   ("ltg/norbert2", 512, 256, 0.001), ("ltg/norbert", 320, 256, 0.001),
                   ("ltg/norbert", 512, 256, 0.001), ("NbAiLab/nb-bert-base", 320, 256, 0.001),
                   ("NbAiLab/nb-bert-base", 512, 256, 0.001)]

    st.write("Number of tests: ", len(test_params))

    for model_name, bs, ml, lr in test_params:
        parser = ArgumentParser()
        parser.add_argument("--batch_size", action="store", type=int, default=bs)
        parser.add_argument("--lr", action="store", type=float, default=lr)
        parser.add_argument("--epochs", action="store", type=int, default=20)
        parser.add_argument("--num_threads", action="store", type=int, default=0)
        parser.add_argument("--bert_model_name", default=model_name)
        parser.add_argument("--unit_type", default="all_units")
        parser.add_argument("--freeze", default=True)
        parser.add_argument("--seed_value", default=2023)
        parser.add_argument("--stop_after", default=3)
        parser.add_argument("--max_len", default=ml)
        parser.add_argument("--oversample", default=False)
        args = parser.parse_args()
        st.write(f"{args.bert_model_name} - {args.lr} - {args.batch_size} - {args.max_len} - Oversampled: {args.oversample} - Frozen: {args.freeze}")
        run_bert(args)
        st.write(f"Done with {args.bert_model_name}.")
        report_gpu()

```

Thank you so much for your interest!

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [May 30, 2023, 6:23pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/4 "2023-05-30T18:23:36Z")

</div>

Hello @ececet, regarding the Spaces Streamlit SDK, we don’t use conda. The Python environment is already configured to run Streamlit, given the `sdk_version`. Could you please try to comment out ‘conda’ from your `requirements.txt` in the Space branch?

---

<div class="post-metadata">

**Author:** ![ececet](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ececet/32/20857_2.png) [@ececet](https://discuss.huggingface.co/u/ececet)\
**Post date:** [May 31, 2023, 4:48am UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/5 "2023-05-31T04:48:27Z")

</div>

Hi @radames, thank you so much! This has solved the problem. I still think it is weird though, because I have been using Huggingface Spaces with streamlit with those configurations for months and it has never been an issue before. Thanks a lot! 🙂

---

<div class="post-metadata">

**Author:** ![Shoaib-33](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Shoaib-33](https://discuss.huggingface.co/u/Shoaib-33)\
**Post date:** [August 20, 2023, 1:04pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/6 "2023-08-20T13:04:23Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/f/e/feeae49c0b233b62e4a1fbe886104368a3f4d8bd.png)

I am getting this error while deploying my streamlit app in huggingface. Can anyone help?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 20, 2023, 7:44pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/7 "2023-08-20T19:44:29Z")

</div>

hi @Shoaib-33, this is a Python error,  
Please try setting Python 3.9 on the yaml README.md on your Space

`python_version: 3.9.17`

---

<div class="post-metadata">

**Author:** ![Shoaib-33](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Shoaib-33](https://discuss.huggingface.co/u/Shoaib-33)\
**Post date:** [August 20, 2023, 7:46pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/8 "2023-08-20T19:46:13Z")

</div>

> [@radames](#):
>
> python\_version: 3.9.17

* * *

## title: My Awesome Space emoji: 🚀 colorFrom: “#FF0000” colorTo: “#00FF00” sdk: streamlit sdk\_version: 1.0.0 app\_file: app.py python\_version: 3.9.17 pinned: false

is it ok?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 20, 2023, 7:47pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/9 "2023-08-20T19:47:31Z")

</div>

Yes, please try it out! thanks

---

<div class="post-metadata">

**Author:** ![Shoaib-33](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Shoaib-33](https://discuss.huggingface.co/u/Shoaib-33)\
**Post date:** [August 20, 2023, 8:00pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/10 "2023-08-20T20:00:12Z")

</div>

![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/0/a/0a4e340d0c0064b6e04b0901a29f7e7e5e75f477.png)

now its showing this error

attrs==22.1.0

beautifulsoup4==4.12.2

altair

numpy==1.21.2

pandas==1.3.3

css==0.1

efficientnet-pytorch==0.7.1

en-core-web-sm @ [https://github.com/explosion/spacy-models/releases/download/en\_core\_web\_sm-3.5.0/en\_core\_web\_sm-3.5.0-py3-none-any.whl](https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl)

GitPython==3.1.31

google==2.0.3

google-auth==2.20.0

google-auth-oauthlib==1.0.0

google-pasta==0.2.0

googletrans==4.0.0rc1

gradio==3.39.0

gradio\_client==0.3.0

graphviz==0.20.1

greenlet==2.0.2

grpcio==1.56.0

gTTS==2.3.2

h11==0.9.0

h2==3.2.0

h5py==3.9.0

hpack==3.0.0

hstspreload==2023.1.1

html5lib==1.1

httpcore==0.9.1

httpx==0.13.3

huggingface-hub==0.14.1

humanfriendly==10.0

keras==2.12.0

matplotlib==3.7.1

matplotlib-inline==0.1.6

mdit-py-plugins==0.3.3

newspaper3k==0.2.8

nltk==3.8.1

onnx==1.14.0

this is my requirements.txt file

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 20, 2023, 8:03pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/11 "2023-08-20T20:03:22Z")

</div>

try pinning `altair==4.2.2`

---

<div class="post-metadata">

**Author:** ![J130N](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/j130n/32/38556_2.png) [@J130N](https://discuss.huggingface.co/u/J130N)\
**Post date:** [January 3, 2025, 2:48pm UTC](https://discuss.huggingface.co/t/build-error-exit-code-1/41520/12 "2025-01-03T14:48:24Z")

</div>

Hello, I am experiencing the same problem when trying to duplicate aicovergen. Any solutions? I can’t show the error since my account is free but it is something about requiring to loosen package version.

 ![IMG_1375](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/1/1111ecbcd8b0b1fa5099b5f072d48e54aed2f2f4.png)
