프로그램언어/python
[Python] Environment Variables Setting
에블릿
2010. 5. 1. 17:55
* Python을 사용하기 위해서 환경설정을 해야 한다.
* 특히 기본적으로 제공하는 라이브러리 이외에 추가적인 라이브러리를 사용할 때 꼭 추가.
* table 1.1 Important Enviroment variables.
* The Python interpreter recognizes a handful of environment variable settings, but only a few are used often enough to warrant explanation here.
* the PATH setting lists a set of directoriess that the operation system searches for executable programs.
* the PYTHONPATH setting serves a role similar to PATH: the Python interpreter consults the PYTHONPATH variable to locate module files when you import them in a program.
* If PYTHONSTARTUP is set to the pathname of a file of Python code, Python executes the file's code automatically whenever you start the interactive interpreter, as though you had typed it at the interactive command line.
ㅇ batch 관련 세팅 정보를 세팅함.
1. 첫 번째 - 윈도우 환경설정
2. 두 번째 - batch 파일을 만들어 사용
PATH C:\Python26; set PYTHONPATH=.;C:\Python26\libs;C:\Python26\Lib\lib-tk set TCL_LIBRARY=C:\Python26\tcl\tcl8.5 set TK_LIBRARY=C:\Python26\tcl\tk8.5 python