Name clash of two different bson modules - How can I use both pymongo's bson module and bson's bson module in the same script?
问题 How to avoid the name clash of pymongo's bson module and bson's (py-bson on GitHub) bson module? 回答1: Install bson package as pybson , see https://github.com/py-bson/bson/issues/70. I have used pip uninstall bson and pip install pybson now so that I can use import pybson as bson when I want the old name back. If I accidentally need both pymongo 's and pybson 's import bson , I can use aliases. 来源: https://stackoverflow.com/questions/63068007/name-clash-of-two-different-bson-modules-how-can-i