If no PYTHONHOME is set, run below inside Maya:
import sys print sys.prefix
returns /Python dir inside Maya install location.
Now let PYTHONHOME=”C:\\python26″, where stand-along python is installed. Run the same lines in Maya, we get:
c:\python26
So we explicitly choose the version of Python to work inside Maya. But there is something confusing about this Python. If you run
sys.version
It will appear to be different from the version running outside Maya. Run
sys.path
to check module search path. It will start will Maya /bin dir. While Python outside starts searching modules in C:\\windows\\system32
Another issue is Maya still need Python to load Maya modules. There is a /maya dir inside Maya\\Python\\Lib\\site-packages, copy it into C:\\python26\\Lib\\site-packages, so Python can find the modules.