게시판 정책상 맞지 않으면 삭제 하셔도 됩니다.
1. My 개발 환경
OS: Window11 (괜히 upgrade했습니다. 안정화 이후 upgrade 추천 합니다)
Editor: IntellliJ (JetBrain), colaboratory(google)
※ Eclipse, Visual Studio Code 등도 동일 적용 예상합니다
2. 오류 메세지:
AttributeError: module 'tensorflow.compat.v2.__internal__.distribute' has no attribute 'strategy_supports_no_merge_call'
3. 원인:
tensorflow, keras 버전별 기능 지원 상충 (구글링 내용 기반 추정 원인입니다)
4. 해결: tensorflow, keras uninstall/install함
1) IntellliJ (JetBrain) : 터미널에서 아래 명령어 수행함
pip uninstall keras >> Proceed (Y/n)? y
pip uninstall keras-nightly >> Proceed (Y/n)? y
pip uninstall keras-Preprocessing >> Proceed (Y/n)? y
pip uninstall keras-vis >> Proceed (Y/n)? y
pip uninstall tensorflow >> Proceed (Y/n)? y
pip install tensorflow [원하는 버전이 있으면 버전입력 pip install tensorflow=2.8.0]
(upgrade 필요 시 upgrade >> in my case : c:\python39\python.exe -m pip install --upgrade pip)
pip install keras [원하는 버전이 있으면 버전입력 pip install keras=2.8.0]
2) colaboratory(google) : 콜랩에 직접 코딩하여 ▶실행함
!pip uninstall keras -y
!pip uninstall keras-nightly -y
!pip uninstall keras-Preprocessing -y
!pip uninstall keras-vis -y
!pip uninstall tensorflow -y
!pip install tensorflow [원하는 버전이 있으면 버전입력 pip install tensorflow=2.8.0]
!pip install keras [원하는 버전이 있으면 버전입력 pip install keras=2.8.0]