[Python] ModuleNotFoundError: No module named 'mimetypes'

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    The following error pops out whenever I enter commands like conda info -e conda update condo or conda create env -n 123 in the terminal.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    ...
    from ..gateways.connection.download import download
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/conda/gateways/connection/__init__.py", line 39, in <module>
    from pip._vendor.requests import ConnectionError, HTTPError, Session
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 43, in <module>
    from pip._vendor import urllib3
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 38, in <module>
    from .request import RequestMethods
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/request.py", line 3, in <module>
    from .filepost import encode_multipart_formdata
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/filepost.py", line 10, in <module>
    from .fields import RequestField
    File "/Users/liguolun/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/fields.py", line 3, in <module>
    import mimetypes
    ModuleNotFoundError: No module named 'mimetypes'


    How can it be fixed?

    Continue reading...

Compartilhe esta Página