I want to try import pymongo via JupyterLab but i have received an error message
and tried uninstall pymongo, httpx, httpcore and again install them but not work.
how can i solve this problem, please help me.
Thank you for interest.
let me show you that message:
import yfinance as yf
from pymongo import MongoClient
---------------------------------------------------------------------------
.......
.....
....
~anaconda3libsite-packagesdnsquery.py in <module>
65 import httpx
66
---> 67 _CoreNetworkBackend = httpcore.NetworkBackend
68 _CoreSyncStream = httpcore._backends.sync.SyncStream
69
AttributeError: module 'httpcore' has no attribute 'NetworkBackend'
2
Answers
I also ran into this problem yesterday with a container that was working prior to 7/26/23.
My issue seemed to be stemming from FastAPI at first glance but what I found is it actually came from a dns support package called dnspython.
Seems to me whatever they updated on 7/26/23 is the source of this issue.
For me forcing an earlier version of dnspython solved my issue.
As @Philip Rago mentioned, the error is with the dnspython package.
Try executing the following command-
This installs the version of dnspython prior to the latest one that is causing the error.