Python has "more eggs than a hen-house"

The complexity of that question and the complexity of the answer is nigh onto “np-hard”.

I will say "it depends on what and where the packages are installed and the python path.

UNLESS YOU ARE USING VIRTUAL ENVIRONMENTS, Python usually looks for stuff:

  • “local to executing program”,
  • then “user/.local/lib/pythonx.x/site-packages”,
  • then /usr/local/lib/pythonX.X/dist-packages
     

The only way to know for sure where it is looking for stuff, is to ask python:

$ python3
>>> import sys
>>> print(sys.path)
['/home/pi/.local/lib/python3.7/site-packages/plotext', '', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/pi/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/local/lib/python3.7/dist-packages/wiringpi-2.60.0-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/smbus_cffi-0.5.1-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/python_periphery-2.1.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/cffi-1.14.3-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/pycparser-2.20-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/DI_Sensors-1.0.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Line_Follower-1.0.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/gopigo3-1.2.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/brickpi3-0.0.0-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/grovepi-1.4.1-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/pivotpi-0.0.0-py3.7.egg', '/usr/lib/python3/dist-packages']

Now for where some specific thing was found that you are using, you can ask:

>>> import easygopigo3
>>> easygopigo3.__file__
'/usr/local/lib/python3.7/dist-packages/gopigo3-1.2.0-py3.7.egg/easygopigo3.py'
>>> 
  • When you find eggs in some Dexter/…/build/ those are artifacts of the build/install process and are not on the path.

  • When you see gopigo.py in /Dexter/GoPiGo3/Software/Python/ it is useful for looking at, and was used in the build/install process, but it isn’t on the path.

Python has a lot of “introspection” features, that we would learn if we ever took a real live comprehensive Python language course,
but as I remarked elsewhere, I get bored very quickly taking courses and end up learning only what there are examples for.
As a result, I am not a good person to answer your question. Hope my answer is actually correct.

  • This is Carl’s current “Official dist eggs” (Carl only uses Python3 and ignores all the Python2.7 eggs):
$ ls /usr/local/lib/python3.7/dist-packages/ | grep egg
brickpi3-0.0.0-py3.7.egg
cffi-1.14.3-py3.7-linux-armv7l.egg
Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.7.egg
DI_Sensors-1.0.0-py3.7.egg
gopigo3-1.2.0-py3.7.egg
grovepi-1.4.1-py3.7.egg
Line_Follower-1.0.0-py3.7.egg
minimalKB-0.9.egg-info
pivotpi-0.0.0-py3.7.egg
pycparser-2.20-py3.7.egg
python_periphery-2.1.0-py3.7.egg
smbus_cffi-0.5.1-py3.7-linux-armv7l.egg
wiringpi-2.60.0-py3.7-linux-armv7l.egg

NOTE: Dave is using gopigo3 version 1.3 which is the latest, but Carl is still sitting comfortably on version 1.2.

No idea. You can check the version number of everything Python is using with"

pip3 freeze
...

or 

$ pip3 freeze | grep gopigo3
gopigo3==1.2.0