Home>

I bet the encoder library is installed -and it even gets installed. However, when trying to import, it persists in giving an error:

ModuleNotFoundError: No module named 'encoder'

Already pip has been updated to the latest version, and still nothing. And the same problem in Google Colab. Maybe there is a recipe for overcoming the irresistible failure?

pip freeze what shows? Operating system? Run pip install encoder --log LOG_FILE with logs, what does it say here?

Dmitry2022-01-05 07:49:32

@Dmitry it shows the presence of the Encoder module. And a failure in the line from encoder.params_data import *

Алексей Казанцев2022-01-05 08:20:44

Encoder is written with a capital letter? give a link to the module from pypi.org/. Maybe like this from Encoder.params_data import *

Dmitry2022-01-05 08:22:18

@Dmitry when I indicate with a capital letter, the error is No module named 'RPi'. Module link -pypi.org/project/Encoder

Алексей Казанцев2022-01-05 08:29:04

Yes, I wrote you commands to install the required dependency. And I think you understand what to use when importing Encoder with a capital letter. Docks add-on module

Dmitry2022-01-05 08:35:08
  • Answer # 1

    In order:

    1. make sure the module is installed
    pip freeze
    
    1. Read the documentation for the module. And it seems to me that the error might just creep in in a typo, since
    import Encoder
    

    with a capital letter (if I found that module)

    1. Make sure the module is for your versionPython

    2. If the problem with the installation can be caught by logs

    pip install Encoder --log LOG_FILE
    

    UPD

    In the comments, we figured out that the module itself is installed. The problem was a typo in the import.

    # not correct
    from encoder.params_data import *
    # right
    from Encoder.params_data import *