lightgbm error

eunbi kim·7일 전
0

LightGBM 돌리다가...

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

파이썬과 넘파이간의 버전이 달라서 생기는 오류

버전확인

np.__version__

-> '1.24.3'

파이썬 버전 3.8에서 실행하는 상황이었다. -> 넘파이를 다운그레이드하라 하는데, 그러면 또 판다스랑 안맞아서 에러발생..

pip install numpy==1.23

일단 다운그레이드 해보고 다시 돌렸는데 안됨,

결국 파이썬 3.12 버전 환경에서 돌렸다-성공

0개의 댓글