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

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

1. Problem phenomenon

Installation opencv-pythonincorrect report:

wohu@ubuntu:~$ pip2 install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple         --no-cache-dir --timeout=100000
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0MB)
    100% |████████████████████████████████| 88.0MB 5.1MB/s 
Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

wohu@ubuntu:~$ 

2. Solution

The reason is /tmpfull, you can for /tmpredirection:

wohu@ubuntu:~$ mkdir $HOME/tmp
wohu@ubuntu:~$ echo $TMPDIR

wohu@ubuntu:~$ export TMPDIR=$HOME/tmp
wohu@ubuntu:~$ chmod -R 777 /tmp

re-install

wohu@ubuntu:~$ pip2 install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple         --no-cache-dir --timeout=100000
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0MB)
    100% |████████████████████████████████| 88.0MB 1.9MB/s 
  Installing build dependencies ... \

Guess you like

Origin blog.csdn.net/wohu1104/article/details/112503879