Spark 예제의 Executor에서 numpy 등 Python 라이브러리를 찾지 못하는 증상이 나타난다.
Spark Executor가 어느 NodeManager 호스트에서든 실행될 수 있어 제출 호스트에만 패키지를 설치하면 실패할 수 있다.
YARN NodeManager 역할이 있는 모든 호스트에 numpy와 작업에 필요한 Python 라이브러리를 설치한다.
명령 예시는 문서 작성 시 보강한 것이며 대상 시스템에서 실행 검증하지 않았다.
sys.executable과 spark.pyspark.python을 확인하고 Executor에 필요한 패키지·버전을 정한다.'<executor-python-path>' -m pip install 'numpy==<검증한-버전>'
'<executor-python-path>' -c 'import numpy,sys; print(sys.executable,numpy.__version__)'
--archives로 배포하는 방식을 사용한다. conda-pack/venv-pack archive의 Python 호환 조건을 확인한다.Executor가 배치될 수 있는 모든 호스트에서 같은 버전 모듈이 로딩되는지 확인한다.