tmux 및 화면에서 환경 변수 설정 문제

tmux 및 화면에서 환경 변수 설정 문제

tmux 또는 screen 세션에서 Tensorflow(Python 라이브러리)를 사용할 때마다 환경 변수를 수동으로 변경해야 합니다. 구체적으로 export PATH blah blah blah합계를 입력해야 합니다 export LD_LIBRARY_PATH blah blah blah. 일반적으로(tmux 및 화면 외부) 내 .bashrc에 다음이 포함되어 있으므로 이 작업을 수행할 필요가 없습니다.바로 이 라인들이에요.

이상하게도 어떤 이유로 source ~/.bashrctmux 또는 screen에서 실행하면 경로 변수가 업데이트되지 않습니다. 내 질문 source ~/.bashrc.profiletmux와 screen이 두 개의 내보내기 라인을 자동으로 실행하도록 하려면 어떻게 해야 합니까 ?

편집: 실행 후 set -x; source ~/.bashrc인쇄물 끝 부분에 다음과 같이 표시됩니다.

    ++ export 'PATH=/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}'
++ PATH='/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}'
++ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64:/home/ajherman/arrayfire-3/lib:/home/ajherman/arrayfire-3/lib
++ LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64:/home/ajherman/arrayfire-3/lib:/home/ajherman/arrayfire-3/lib
++ bind TAB:menu-complete
++ export 'PATH=/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}'
++ PATH='/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}'
++ export 'PATH=/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}}'
++ PATH='/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/home/ajherman/anaconda3/bin:/home/ajherman/anaconda3/bin:/usr/local/cuda-9.0/bin/usr/local/cuda-9.0/bin/home/ajherman/bin:/home/ajherman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}}}}'
++ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64:/home/ajherman/arrayfire-3/lib:/home/ajherman/arrayfire-3/lib
++ LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64/usr/local/cuda-9.0/lib64:/home/ajherman/arrayfire-3/lib:/home/ajherman/arrayfire-3/lib

관련 정보