Python
[Error] Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' 해결 방법
daewooki
2022. 5. 25. 12:44
반응형
pickle 형식의 파일을 읽으려고 할 때 Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' 에러가 발생하는 경우가 있다.
오류 발생 코드
1
2
3
|
with open(input_file, "rb") as f:
lines = pickle.load(f)
print(lines)
|
cs |
원인
pickle 파일을 만든 컴퓨터의 pandas 버전과, 사용하고자 하는 컴퓨터의 pandas 버전이 다른 경우에 발생한다.
해결 방법
pickle 파일을 만든 컴퓨터의 pandas 버전을 pip list 로 확인한 후, 사용하고자 하는 컴퓨터의 pandas 버전도 맞추어 준다.
반응형