Processing math: 100%
본문 바로가기

Programming/Etc

[Tensorboard] tensorboard를 찾지 못하는 경우 / 서버 원격 접속 시 tensorboard 사용 못하는 경우 (ERROR: Could not find tensorboard. Please ensure that your PATH contains an executable tensorboard program)

728x90
반응형

Tensorboard를 가상환경에서 launch가 안되는 현상이 발생했다.

찾아보니 notebook과 가상 환경 사이 어떠한 충돌 때문이라고 한다.

 

ERROR: Could not find `tensorboard`. Please ensure that your PATH contains an executable `tensorboard` program

 

 

이럴 경우에는 임의로 환경 변수를 설정해주면 실행이 가능하다!

os.environ['TENSORBOARD_BINARY'] = '/가상환경path/bin/tensorboard'

 

 

그러나 서버에 원격 접속하여 tensorboard를 사용하는 경우 tensorboard가 여전히 안뜨는 경우가 있다.

그럴 경우에는 다음과 같이 원하는 포트를 설정한 후

 

%tensorboard --logdir "logs" --host=localhost --port (원하는 포트)

 

다음과 같이 포트포워딩을 해주면 노트북으로도 원격 서버의 tensorboard에 접근이 가능하다:)

 ssh -N -f -L localhost:(원하는 포트):localhost:(원하는 포트) (원격 접속 할 서버 주소)
728x90
반응형