Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

Tags:

python

spacy

I was trying to install

python -m spacy download en_vectors_web_lg

But it was throwing error:

Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

May I know why is it creating the error ? Is it saying that I do not have enogh space in directory to install ??

like image 690
Vas Avatar asked Mar 11 '19 13:03

Vas


4 Answers

Most likely it is trying to download the data to your /tmp temporary location. My guess is that the default settings (usually half your ram) is too small to handle the download.

You can disable the tmp mount by using the following command: systemctl mask tmp.mount. Be careful and do your research before doing this.

Alternatively you can set your TMPDIR directory to /var/tmp by doing the following export TMPDIR='/var/tmp'

like image 148
Albert Lee Avatar answered Nov 20 '22 02:11

Albert Lee


As it is mentioned here, you can create a directory where you have enough space, say /folder/address/here/, and run below command to install it:

TMPDIR=/folder/address/here/ pip install --cache-dir=$TMPDIR --build $TMPDIR package-name

Since my own case was upgrading tensorflow, I ran this:

TMPDIR=/folder/address/here/ pip install --upgrade --cache-dir=$TMPDIR --build $TMPDIR tensorflow
like image 27
am.rez Avatar answered Nov 20 '22 01:11

am.rez


I had to do a system prune to make more space.

docker system prune

Note that this will "remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes." So make sure you're not blowing away anything you need.

like image 15
kenecaswell Avatar answered Nov 20 '22 02:11

kenecaswell


If you are working on a docker container I would advise to figure out why your docker is full, and then empty whatever is taking up space.

To figure out what is taking up the space run:

docker system df

After that run:

docker <container/image/builder> prune --all

to clean whatever takes up all the space.

like image 1
Shlomo Koppel Avatar answered Nov 20 '22 01:11

Shlomo Koppel