When I import pyBullet, it immediately prints a line with the time when it was build:
In [1]: import pybullet
pybullet build time: Jun 19 2020 04:01:58
Is there a way to prevent this?
Change the source code. Jokes aside, I think there is no obivious way to prevent this from happening. Since it happens when you import the module, there is not much you can do in configuration of pybullet. Because it is literally the first thing you do with it.
Maybe you can reroute stdout during the import of the module. Which is a duplicate question already answered here: Stop Python Module from Printing