Hii,
I’m attempting to install dependencies via packages.txt., but getting this build error “Unable to locate package”.
--> RUN sed -i 's/deb.debian.org/cdn-aws.deb.debian.org/g' /etc/apt/sources.list && sed -i 's/archive.ubuntu.com/us-east-1.ec2.archive.ubuntu.com/g' /etc/apt/sources.list && sed -i '/security/d' /etc/apt/sources.list && apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
Err:1 http://cdn-aws.cdn-aws.deb.debian.org/debian buster InRelease
Could not resolve 'cdn-aws.cdn-aws.deb.debian.org'
Err:2 http://cdn-aws.cdn-aws.deb.debian.org/debian buster-updates InRelease
Could not resolve 'cdn-aws.cdn-aws.deb.debian.org'
Reading package lists...
W: Failed to fetch http://cdn-aws.cdn-aws.deb.debian.org/debian/dists/buster/InRelease Could not resolve 'cdn-aws.cdn-aws.deb.debian.org'
W: Failed to fetch http://cdn-aws.cdn-aws.deb.debian.org/debian/dists/buster-updates/InRelease Could not resolve 'cdn-aws.cdn-aws.deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package portaudio19-dev
--> ERROR: process "/bin/sh -c sed -i 's/deb.debian.org/cdn-aws.deb.debian.org/g' /etc/apt/sources.list && sed -i 's/archive.ubuntu.com/us-east-1.ec2.archive.ubuntu.com/g' /etc/apt/sources.list && sed -i '/security/d' /etc/apt/sources.list && apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 123
My packages.txt:
portaudio19-dev
hi @pragnakalp, there is a fix in progress I’ll ping you when it’s in prod
1 Like
hi @Jyotiyadav and @pragnakalp this is fixed on prod now. Please factory reboot your Spaces
2 Likes
@radames
I am unable to install transfromers from requirements.txt. This is the error at run time error after reboot the spaces.
requirements.txt
git+https://github.com/huggingface/transformers.git
PyYAML==6.0
scipy==1.7.3
pytesseract==0.3.9
datasets==2.2.2
seqeval==1.2.2
pdf2image==1.16.0
PyMuPDF==1.21.1
lxml==4.9.1
opencv-contrib-python==4.6.0.66
opencv-python==4.6.0.66
opencv-python-headless==4.6.0.66
File "app.py", line 19, in
from transformers import AutoProcessor
ModuleNotFoundError: No module named 'transformers'
hi @Jyotiyadav, this requirements.txt
list should work fine. Could please share your Space? or try another factory reset?
Note that on your Build logs you will see detailed steps of pip install
if all goes right.
--> COPY --link --chown=1000 requirements.txt /home/user/app/requirements.txt
DONE 5.8s
DONE 5.8s
--> RUN pip install --no-cache-dir -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/huggingface/transformers.git (from -r requirements.txt (line 1))
Cloning https://github.com/huggingface/transformers.git to /tmp/pip-req-build-7kk63no3
Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers.git /tmp/pip-req-build-7kk63no3
Resolved https://github.com/huggingface/transformers.git to commit 44caf4f6f47120a4aaca561c9cc8041455bef705
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: PyYAML==6.0 in /home/user/.local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (6.0)
Thank you for your updates its working fine now.
1 Like
hello i cant import my dependencies , i have try with requirments.txt with packages.txt:
My space is : ArturG9/Lithuanian_Law_RAG_QA_ChatBot_Streamlit
app cant locate packages.
Even if i put langchain first it isn’t installed and couldn’t be located
here is my second space , which is the same just with only requirments.txt