Reputation: 1008
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 ??
Upvotes: 60
Views: 147963
Reputation: 1399
I was getting this while installing PyTorch ...
Similar answers posted above, but in my case i had to remove symlinks and only
set TMPDIR and cache location
(script won't work with things like ~/some-dir
but fully qualified path like below)
TMPDIR='/home/username/tmp' pip3 install 'transformers[torch]' --cache-dir=/home/username/tmp/
Upvotes: 1
Reputation: 11
As Albert Lee said, it's probably because your /tmp directory size isn't enough, (which should be half the size of your dram), alternatively to his solution, you can enlarge your /tmp directory's size by remounting it:
sudo mount -o remount,size=16G /tmp/
Upvotes: 0
Reputation: 1161
For the those nervous at the command line and using Windows or MacOS, launch Docker Desktop
. Look at Images
. That will show you a list of all the images including their status. The status Unused (dangling)
is probably all you want to get rid of. Just select and delete.
Why would I recommend the GUI approach? Because docker prune
"remove's all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes." and that isn't necessarily what you want esp. when you're new at this. For example, Unused
means Not Currently In Use At the Moment
and not no longer useful
or not ever going to be used again
as you might expect when you're starting with Docker.
Upvotes: 1
Reputation: 41
If you are using Ubuntu, you could also try
sudo apt-get clean
This will clear your package cache. After this try installing the package(worked for me).
Upvotes: 4
Reputation: 617
The above methods did not work on my Linux Ubuntu computer.
The solution that finally worked was:
Reboot the computer
Rename /tmp as old.tmp and create a new /tmp folder. This idea came from this post, and the command was below:
mv /tmp /old.tmp mkdir /tmp chmod 1777 /tmp
I suppose that the problem was too many files in the /tmp folder.
Note that when rebooting the computer that has too many files in the /tmp folder, the computer might get stuck. To get around this issue, this post is useful. Briefly speaking, editing the reboot option and change 'ro ...' to 'rw init=/bin/bash' so you will quickly see a bash terminal when rebooting.
Upvotes: 0
Reputation: 945
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.
Upvotes: 7
Reputation: 7598
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.
Upvotes: 38
Reputation: 946
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
Upvotes: 27
Reputation: 745
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'
Upvotes: 69