PYTHONPATH

From emboxit
Revision as of 16:51, 11 September 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

WINXP

To use more than one versions of Python in the same PC

  • From CONTROL PANEL
SYSTEM
ADVANCED
ENVIROMENTAL VARIABLES
PYTHONPATH
  • Set to:
C:\PYTHON26;C:\PYTHON26\DLLs;C:\PYTHON26\LIB;C:\PYTHON26\LIB\LIB-TK
  • OR TO
C:\PYTHON27;C:\PYTHON27\DLLs;C:\PYTHON27\LIB;C:\PYTHON27\LIB\LIB-TK
  • PYTHONPATH variable Supersedes other Python path that is included to PATH variable
  • It is best choice to remove all python paths from PATH variable and control which Python version will be used from PYTHONPATH variable only


Alternative Solution

  • Use eclipse-classic with pyDev
  • Run configurations can control the used python version
  • Better control than WIN PYHTONPATH system variable
  • Works also in LINUX, MAC

References