[Python] zlib.error: Error -5 while decompressing data: incomplete or truncated stream 해결법

환길·2024년 4월 11일

Error

목록 보기
1/13
post-thumbnail
pip install torch

다음과 같이 torch를 설치할 때
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
다음과 같은 오류가 발생합니다.

이 때 해결하는 방법에 대해 소개해드리겠습니다.

pip install --no-cache-dir torch

위의 코드와 같이 --no-cache-dir 옵션을 추가해서 작성하시면 오류가 해결됩니다.

오류가 발생하는 이유는 캐시에 문제가 생겨서 오류가 발생하므로 캐시를 무시하고 설치하도록 하면 문제가 해결됩니다.

0개의 댓글