Panda3D 1.4.0 - Conflict with Python 2.5 (Bug?)

I wanted to try the new Panda3D version. But I get into the following problem:

When I tried to start the Greeting Card from the program group the console closes after a short time - and nothing else appears. Being curious what the reason could be I tried the command promt:

'import site' failed; use -v for traceback
DirectStart: Starting the game.
Traceback (most recent call last):
  File "", line 1, in ?
    import direct.directbase.DirectStart
  File "D:\Panda3D-1.4.0\direct\src\directbase\", line 3, in ?
    from direct.showbase import ShowBase
  File "D:\Panda3D-1.4.0\direct\src\showbase\", line 10, in ?
    from pandac.PandaModules import *
  File "pandac\", line 5, in ?
  File "pandac\", line 12, in ?
  File "direct\src\directnotify\", line 3, in ?
  File "direct\src\directnotify\", line 5, in ?
  File "direct\src\directnotify\", line 6, in ?
  File "direct\src\showbase\", line 40, in ?
  File "C:\Python25\lib\", line 41, in ?
    from warnings import warn as _warn
  File "C:\Python25\lib\", line 264, in ?
    simplefilter("ignore", category=ImportWarning, append=1)
NameError: name 'ImportWarning' is not defined

As it seems - there seems to be a conflict with my installed Python 2.5 version. But since I need this version for other things (for example Blender), I can’t simply uninstall this version.

After that I tried installing and running Airblade 1.4.0. This also doesn’t work (as expected) - surely the same problem.

I’m using Win XP Home. Python 2.5 is installed. It seems to be important to me to note for your reproducability of the bug that I set the following environment variable (Blender3D requires it):


Interestingly Python 2.5 is not in my PATH (so when I start python from the command prompt by typing python the version of Panda3D starts).

I hope this information helps you to reprocude and hopefully fix this bug.

You must have the old version of Panda3D still installed, because, in Panda3D 1.4.0, there is no ppython anymore. Try uninstalling the old version and running with python instead of ppython.

It exists on my install at C:\Panda3D-1.4.0\python\ppython.exe


In the windows version, there’s still a residual ‘ppython.’ It doesn’t do anything different than just ‘python’.

I see that the PYTHONPATH is definitely the problem. Interesting.

I wonder what we should do about this. On one hand, I could force it to ignore PYTHONPATH. On the other hand, PYTHONPATH is a useful tool — ignoring it would not be very nice to the people who actually use it.

Oh! I see that python has a command-line option, -E : ignore pythonpath. For now, you can use this option explicitly to run panda programs. I should insert this command-line option into all the start-menu links.

@Josh Yelon

This trick works. Thank you.