본문 바로가기
Programming/Error

[python] 폐쇄망 패키지 설치 에러 : transformers Installation Error - Failed building wheel for tokenizers

by didi0di 2023. 11. 22.
728x90

폐쇄망에 개발환경을 셋팅하다보면,

패키지 종속성이나 버전 문제가 자동으로 해결되지 않아 에러가 자주 발생한다..

 

이번엔 transformers 3.2.0 버전이 필요해서 설치 하던 중

종속 패키지 중 하나인 tokenizers 패키지를 까는데, 아래 에러가 발생했다.

 

ERROR: Failed building wheel for tokenizers
Failed to build tokenizers

 

 

ㅎㅎ.. 

 

열심히 구글링 해 본 결과,

아래 명령어로 pip 를 업그레이드 한 후 재설치해보라는 얘기가 있었다.

 

pip install --upgrade pip

 

하지만 해결되지 않아서 다시 찾아보니 

tar.gz 파일로 된 패키지 설치 시 해당 에러가 발생하는 경우가 있는 것 같았다.

그래서 whl 파일로 바꿔서 다시 설치해보니 해결!

 

내가 참고한 부분이다.

 

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler. To update pip, run: pip install --upgrade pip and then retry package installation.

If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain. [end of output]

 

 

아래 깃헙 참조

https://github.com/huggingface/tokenizers/issues/1050

 

ERROR: Failed building wheel for tokenizers · Issue #1050 · huggingface/tokenizers

System Info I can't seem to get past this error "ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects" when installing transformers with pip. An ...

github.com

 

728x90

댓글