[Python] No module named 'chardet'

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    I have created an exe using cx_Freeze.
    The build was successful.
    Then when I was clicking on the exe, I got:-

    no module named 'queue'


    So, i researched and added this line:-

    from multiprocessing import Queue


    Now i'm getting:-

    no module named 'chardet'.


    This is the full error i am getting :-

    Traceback (most recent call last):
    File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac
    kages\cx_Freeze\initscripts\__startup__.py", line 14, in run
    module.run()
    File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac
    kages\cx_Freeze\initscripts\Console.py", line 26, in run
    exec(code, m.__dict__)
    File "normalapi_2103.py", line 1, in <module>
    File "C:\Users\pc\AppData\Local\Programs\Python\Python36-32\lib\site-pac
    kages\requests-2.18.4-py3.6.egg\requests\__init__.py", line 44, in <module>
    import chardet
    ModuleNotFoundError: No module named 'chardet'


    And i am not getting what to import...

    I have also tried adding


    'requests' and 'os' packages in setup.py.
    ​

    But no luck...

    Continue reading...

Compartilhe esta Página