Python 3 ModuleNotFoundError beheben: No module named 'urlparse'
Problem:
Beim Versuch, urlparse in Python 3 zu importieren mit
import_urlparse_error.py
import urlparsesehen Sie die folgende Fehlermeldung:
import_urlparse_traceback.txt
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [29], in <cell line: 1>()
----> 1 import urlparse
ModuleNotFoundError: No module named 'urlparse'Lösung
In Python 3 wurde urlparse zu urllib.urlparse umbenannt. Um es zu importieren, verwenden Sie stattdessen diese Zeile:
fix_import.py
from urllib.parse import urlparseCheck out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow