Linux, ML/DL, DevOps, 클라우드

category encoders 설치 과정에서 발생한 에러 본문

Programming Language/Python

category encoders 설치 과정에서 발생한 에러

draidev 2024. 2. 4. 23:09

 

인터넷이  안되는 원격 장비(Ubuntu 20.04)에 category encoders와 dependency package들을 설치하는 과정에서 만난 에러를 정리해본다.

 

우선 category_encoders의 requirements목록은 다음 페이지에서 확인 할 수 있다.

https://github.com/scikit-learn-contrib/category_encoders/blob/master/requirements.txt

numpy>=1.14.0
scikit-learn>=1.0.0
scipy>=1.0.0
statsmodels>=0.9.0
pandas>=1.0.5
patsy>=0.5.1
unittest2                # unittest2는 안설치해도 pip install 됨
importlib_resources ; python_version<"3.9"

 

첫 번째 에러,

⚠️ ModuleNotFoundError: No module named 'pandas.core.indexes.numeric’

 

ModuleNotFoundError: No module named 'pandas.core.indexes.numeric' using Metaflow

I used Metaflow to load a Dataframe. It was successfully unpickled from the artifact store, but when I try to view its index using df.index, I get an error that says ModuleNotFoundError: No module ...

stackoverflow.com

 

위 에러의 경우 pandas 버전 문제로 인한 것으로 아래 명령어로 pandas를 downgrade 해주면 해결 됐다.

그런데 두 번째 에러가 발생하였고 이는 내 실수였다.

 

두 번째 에러,

⚠️ pip install pandas를 하는데 zipfile.BadZipFile: File is not a zip file 에러 발생

파일이 깨진게 문제였다.

파일을 업로드 하는 과정에서 문제가 생겨 파일이 깨졌고(전송 중에 끊김) 이 파일로 pip install을 진행하니 whl 파일이 아닌 다른 파일로 인식하는 듯 보인다.

아래 사진을 보면 내가 업로드한 이전 파일과 온전한 파일의 사이즈가 다른 것을 확인 할 수 있다.

Comments