Local pip install issues with gtfs-realtime-bindings

Hi there - I’m at a bit of a loss with what’s happening when I’m installing some modules locally via pip.

I installed gtfs-realtime-bindings locally via pip3 install gtfs-realtime-bindings --target .

I then used the example code (provided here) for testing the install, and received an error because the gtfs_realtime_pb2 module in /google is accessing the protobuf module that should also be in /google but isn’t.

I get this warning when running the command: WARNING: Target directory /home/ec2-user/environment/google already exists. Specify --upgrade to force replacement.

When I run with the –upgrade flag, there’s the inverse problem whereby protobuf does get installed in /google, but the original, /transit module does not.

I believe it’s basically either seeing that /google already exists and not installing protobuf or, with --upgrade flag, it’s overwriting /google entirely with a protobuf install.

How do I pip install when the modules share the same folder, as in this case, and explicitly permit them to both install in this folder properly?