No module named direct.showbase.ShowBase

I’m not exactly sure if this is quite the same pitfall as werts15 is posting about…

One of the suggested ways to install Panda3D is to just use pip. I like pip and think it is a great system, so I did that.

However:

$ which pip
/Library/Frameworks/Python.framework/Versions/3.7/bin/pip

By default, the command:

$ python

(at least on my system) is:

$ which python
/usr/bin/python

Which is currently mapped to Python 2.7 on my system.
But the pip I used was for Python3.

$ which python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3

Previous posts imply you need Python 2.5 or better.
At this point, I only know that the roaming-ralph demo seems to run if I explicitly invoke python3 on main.py

Naturally, if you have used a pip associated with Python 3 installation to install Panda3D, then try to run programs using a python2 exec, it’s not going to see the installed libraries.

One can, of course, do a quick pre-check of their system:

$ python3
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:39:00)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import panda3d
import direct

If those two imports don’t return silently, you can be pretty sure you’re not going to be able to run any sample programs with that Python installation.

Here’s where the libraries have been installed on my Mac:

>>> panda3d.__file__
'/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/panda3d/__init__.py'

>>> direct.__file__
'/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/direct/__init__.py'

It seems that at this point, Panda3d does support Python 3:

Hope that helps at least a few people.
-ej