Python

[error] AttributeError: partially initialized module 'statistics' has no attribute 'mean' (most likely due to a circular import)

til_t 2021. 1. 29. 17:51

statistics 모듈고 다운로드했고, 당연히 statistics 모듈에 mean 함수가 있을 터인데 no attribute 오류가 계속 떠서 찾아보니 파일 이름을 모듈 이름과 똑같이 지정해놔서 생기는 오류였다.

파일 이름을 모듈 이름과 다르게 다시 지정했더니 해결됐다.