Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'adafruit_minimqtt' #52

Open
bhopkinson opened this issue Nov 21, 2020 · 7 comments
Open

ModuleNotFoundError: No module named 'adafruit_minimqtt' #52

bhopkinson opened this issue Nov 21, 2020 · 7 comments

Comments

@bhopkinson
Copy link

I am trying to use minimqtt on linux (running in a docker container), however I am having trouble installing and importing the module.

I have installed the following packages:

pip3 install adafruit-blinka
pip3 install adafruit-circuitpython-lis3dh
pip3 install adafruit-circuitpython-minimqtt

I can confirm that these have been installed with pip3 list:

Package                         Version
------------------------------- -------
Adafruit-Blinka                 5.8.0
adafruit-circuitpython-lis3dh   5.1.5
adafruit-circuitpython-minimqtt 4.0.1
Adafruit-PlatformDetect         2.22.1
Adafruit-PureIO                 1.1.7
pip                             20.2.4
pyftdi                          0.52.0
pyserial                        3.4
pyusb                           1.1.0
setuptools                      50.3.2
wheel                           0.35.1

However if I try import adafruit_minimqtt.adafruit_minimqtt as MQTT then I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'adafruit_minimqtt'

My output of help("modules") is as follows, which shows the other adafruit modules are avilable, however minimqtt is not.

Please wait a moment while I gather a list of all available modules...

Adafruit_PureIO     _tkinter            getopt              resource
__future__          _tracemalloc        getpass             rlcompleter
_abc                _uuid               gettext             runpy
_aix_support        _warnings           glob                sched
_ast                _weakref            graphlib            secrets
_asyncio            _weakrefset         grp                 select
_bisect             _xxsubinterpreters  gzip                selectors
_blake2             _xxtestfuzz         hashlib             serial
_bootlocale         _zoneinfo           heapq               setuptools
_bootsubprocess     abc                 hello               shelve
_bz2                adafruit_blinka     hmac                shlex
_codecs             adafruit_lis3dh     html                shutil
_codecs_cn          adafruit_platformdetect http                signal
_codecs_hk          aifc                idlelib             site
_codecs_iso2022     analogio            imaplib             smtpd
_codecs_jp          antigravity         imghdr              smtplib
_codecs_kr          argparse            imp                 sndhdr
_codecs_tw          array               importlib           socket
_collections        ast                 inspect             socketserver
_collections_abc    asynchat            io                  spwd
_compat_pickle      asyncio             ipaddress           sqlite3
_compression        asyncore            itertools           sre_compile
_contextvars        atexit              json                sre_constants
_crypt              audioop             keyword             sre_parse
_csv                base64              lib2to3             ssl
_ctypes             bdb                 linecache           stat
_ctypes_test        binascii            locale              statistics
_curses             binhex              logging             string
_curses_panel       bisect              lzma                stringprep
_datetime           bitbangio           mailbox             struct
_decimal            board               mailcap             subprocess
_distutils_hack     builtins            marshal             sunau
_elementtree        busio               math                symbol
_functools          bz2                 microcontroller     symtable
_gdbm               cProfile            micropython         sys
_hashlib            calendar            mimetypes           sysconfig
_heapq              cgi                 mmap                syslog
_imp                cgitb               modulefinder        tabnanny
_io                 chunk               multiprocessing     tarfile
_json               cmath               neopixel_write      telnetlib
_locale             cmd                 netrc               tempfile
_lsprof             code                nis                 termios
_lzma               codecs              nntplib             textwrap
_markupbase         codeop              ntpath              this
_md5                collections         nturl2path          threading
_multibytecodec     colorsys            numbers             time
_multiprocessing    compileall          opcode              timeit
_opcode             concurrent          operator            tkinter
_operator           configparser        optparse            token
_osx_support        contextlib          os                  tokenize
_peg_parser         contextvars         ossaudiodev         trace
_pickle             copy                parser              traceback
_posixshmem         copyreg             pathlib             tracemalloc
_posixsubprocess    crypt               pdb                 tty
_py_abc             csv                 pickle              turtle
_pydecimal          ctypes              pickletools         turtledemo
_pyio               curses              pip                 types
_queue              dataclasses         pipes               typing
_random             datetime            pkg_resources       unicodedata
_sha1               dbm                 pkgutil             unittest
_sha256             decimal             platform            urllib
_sha3               difflib             plistlib            usb
_sha512             digitalio           poplib              uu
_signal             dis                 posix               uuid
_sitebuiltins       distutils           posixpath           venv
_socket             doctest             pprint              warnings
_sqlite3            easy_install        profile             wave
_sre                email               pstats              weakref
_ssl                encodings           pty                 webbrowser
_stat               ensurepip           pulseio             wheel
_statistics         enum                pwd                 wsgiref
_string             errno               py_compile          xdrlib
_strptime           faulthandler        pyclbr              xml
_struct             fcntl               pydoc               xmlrpc
_symtable           filecmp             pydoc_data          xxlimited
_sysconfigdata__linux_x86_64-linux-gnu fileinput           pyexpat             xxsubtype
_testbuffer         fnmatch             pyftdi              zipapp
_testcapi           formatter           queue               zipfile
_testimportmultiple fractions           quopri              zipimport
_testinternalcapi   ftplib              random              zlib
_testmultiphase     functools           re                  zoneinfo
_thread             gc                  readline
_threading_local    genericpath         reprlib

I am new to python, so apologies if I am missing something silly - however any assistance would be gratefully received.

Thank you.

@brentru
Copy link
Member

brentru commented Nov 23, 2020

This library does not yet work with CPython/Linux. It is being currently worked on #43.

I'll leave this issue open so I can address it when bringing in the CPython compatibility changes.

@brentru brentru self-assigned this Nov 23, 2020
@brentru
Copy link
Member

brentru commented Feb 19, 2021

@bhopkinson Hi, do you still have this issue? The latest version of this library is CPython compatible and may be installed using the Python package manager.

@brentru brentru removed their assignment Feb 19, 2021
@bruno963852
Copy link

@brentru I'm experiencing the same issue...

@EnzoPortela
Copy link

@brentru Me too

@tekktrik
Copy link
Member

tekktrik commented Oct 7, 2022

@bruno963852, @EnzoPortela - do you still have this issue? This should be fixed.

@brentru
Copy link
Member

brentru commented Apr 11, 2023

@tekktrik I do not mind testing this next week - does it still need to be tested before we can close out?

@tekktrik
Copy link
Member

I think it's worth keeping open until tested, unless you know the change that fixed, as I don't (unless it was some weird packaging thing I fixed and that's why I chimed in later).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants