LoginSignup
2
1

More than 3 years have passed since last update.

pip install時にERROR: Could not install packages due to an OSError: [Errno 5] Input/output errorが出た

Last updated at Posted at 2021-03-18

はじめに

Python, pipでrequirements.txtを使ってパッケージ一括インストール
https://note.nkmk.me/python-pip-install-requirements/
を試みた際、表題のエラーでハマったので、備忘録として対処法を書き残しておきます。

環境

Windows 10 Home
Docker 19.03
docker run -d -it --mount type=bind,source="$(pwd)",target=/app nginx:latest
にて作成したコンテナ内で行いました。

コマンドとエラーメッセージ

# pip3 install --user -r requirements.txt
Collecting tensorflow==2.4.0
  Downloading tensorflow-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl (394.7 MB)
     |████████████████████████████████| 394.7 MB 10.4 MB/s eta 0:00:01ERROR: Could not install packages due to an OSError: [Errno 5] Input/output error

原因と対処

ググるとRAMの不良などが原因との記事が出てくるのですが、
https://askubuntu.com/questions/65830/errno-5-input-output-error-when-trying-to-install-ubuntu
私の環境ではWindowsのボリューム不足が原因であり、不要なファイル削除により解決しました。

ちなみに、Dockerがボリュームを圧迫している場合には、以下の方法で消しましょう。
Macの記事ですが、Windowsでも利用できます。
https://qiita.com/shinespark/items/526b70b5f0b1ac643ba0

2
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1