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?
Solution 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.
Post a Comment for "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?"