Missing modules like esp, network, machine

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
doublemcz
Posts: 2
Joined: Mon Oct 19, 2020 6:49 am

Missing modules like esp, network, machine

Post by doublemcz » Mon Oct 19, 2020 6:55 am

Hi,

I am new to the MicroPython and maybe I missing key concepts. I erased flashed on my NodeMCU (2MB flash) and installed the lastest firmware. https://micropython.org/resources/firmw ... -v1.13.bin

I am able to communicate with it over serial port. I can see list of modules but the most important ones like 'esp', 'network', 'machine' are not just there. Are they need to be uploaded manually? How? Note, I am using Windows 10 and the mass storage is not showing up for any upload :/

There is a list of modules I can see.

Code: Select all

>>> help('modules')

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

C:\Users\mail\AppData\Local\Mu\pkgs\IPython\kernel\__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
C:\Users\mail\AppData\Local\Mu\Python\python36.zip\pkgutil.py:107: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
    Install tornado itself to use zmq with the tornado IOLoop.
    
IPython             brain_builtin_inference gpiozerocli         qtconsole
PIL                 brain_collections   guizero             queue
PyQt5               brain_crypt         gzip                quopri
__future__          brain_curses        hashlib             random
_ast                brain_dataclasses   heapq               re
_asyncio            brain_dateutil      hmac                reprlib
_bisect             brain_fstrings      html                requests
_blake2             brain_functools     http                rlcompleter
_bootlocale         brain_gi            idna                rmagic
_bz2                brain_hashlib       imaplib             runpy
_codecs             brain_http          imghdr              sched
_codecs_cn          brain_io            imp                 secrets
_codecs_hk          brain_mechanize     importlib           select
_codecs_iso2022     brain_multiprocessing inspect             selectors
_codecs_jp          brain_namedtuple_enum io                  semver
_codecs_kr          brain_nose          ipaddress           serial
_codecs_tw          brain_numpy_core_fromnumeric ipykernel           setuptools
_collections        brain_numpy_core_function_base ipykernel_launcher  shelve
_collections_abc    brain_numpy_core_multiarray ipython_genutils    shlex
_compat_pickle      brain_numpy_core_numeric isort               shutil
_compression        brain_numpy_core_numerictypes itertools           signal
_csv                brain_numpy_core_umath jedi                simplegeneric
_ctypes             brain_numpy_ndarray json                sipbuild
_datetime           brain_numpy_random_mtrand jupyter             site
_decimal            brain_numpy_utils   jupyter_client      six
_dummy_thread       brain_pkg_resources jupyter_core        smtpd
_elementtree        brain_pytest        keyword             smtplib
_findvs             brain_qt            kiwisolver          sndhdr
_functools          brain_random        lazy_object_proxy   socket
_hashlib            brain_re            lib2to3             socketserver
_heapq              brain_six           linecache           sqlite3
_imp                brain_ssl           locale              sre_compile
_io                 brain_subprocess    logging             sre_constants
_json               brain_threading     lzma                sre_parse
_locale             brain_typing        macpath             ssl
_lsprof             brain_uuid          macurl2path         stat
_lzma               builtins            mailbox             statistics
_markupbase         button              mailcap             storemagic
_md5                bz2                 marshal             string
_msi                cProfile            math                stringprep
_multibytecodec     calendar            matplotlib          struct
_multiprocessing    certifi             mccabe              subprocess
_opcode             cgi                 mimetypes           sunau
_operator           cgitb               mmap                symbol
_osx_support        chardet             modulefinder        sympyprinting
_overlapped         chunk               msilib              symtable
_pickle             cmath               msvcrt              sys
_pydecimal          cmd                 mu                  sysconfig
_pyio               code                multiprocessing     tabnanny
_random             codecs              netrc               tarfile
_sha1               codeop              nntplib             telnetlib
_sha256             collections         nt                  tempfile
_sha3               colorsys            ntpath              tests
_sha512             colorzero           nturl2path          textwrap
_signal             compileall          nudatus             this
_sitebuiltins       concurrent          numbers             threading
_socket             configparser        numpy               time
_sqlite3            contextlib          opcode              timeit
_sre                copy                operator            tkinter
_ssl                copyreg             optparse            token
_stat               crypt               os                  tokenize
_string             csv                 parser              tornado
_strptime           ctypes              parso               trace
_struct             curses              pathlib             traceback
_symtable           cycler              pdb                 tracemalloc
_thread             cythonmagic         pexpect             traitlets
_threading_local    datetime            pgzero              tty
_tkinter            dateutil            pickle              turtle
_tracemalloc        dbm                 pickleshare         typed_ast
_warnings           decimal             pickletools         types
_weakref            decorator           pigpio              typing
_weakrefset         difflib             pipes               unicodedata
_winapi             dis                 pkg_resources       unittest
abc                 distutils           pkgutil             urllib
aifc                doctest             platform            urllib3
antigravity         dummy_threading     plistlib            uu
appdirs             easy_install        poplib              uuid
argparse            email               posixpath           warnings
array               encodings           pprint              wave
ast                 enum                profile             wcwidth
astroid             errno               prompt_toolkit      weakref
asynchat            faulthandler        pstats              webbrowser
asyncio             filecmp             pty                 winreg
asyncore            fileinput           ptyprocess          winsound
atexit              fnmatch             py_compile          wrapt
audioop             formatter           pyclbr              wsgiref
autoreload          fractions           pycodestyle         xdrlib
backcall            ftplib              pydoc               xml
base64              functools           pyexpat             xmlrpc
bdb                 gc                  pyflakes            xxsubtype
binascii            genericpath         pygame              zipapp
binhex              getopt              pygments            zipfile
bisect              getpass             pylab               zipimport
boot                gettext             pylint              zlib
brain_argparse      glob                pyparsing           zmq
brain_attrs         gpiozero            pytz                

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Missing modules like esp, network, machine

Post by pythoncoder » Mon Oct 19, 2020 4:39 pm

It seems that the Python you are running is on your PC, not on the ESP. I would connect to the ESP using a terminal program or the WebREPL and try again.
Peter Hinch
Index to my micropython libraries.

doublemcz
Posts: 2
Joined: Mon Oct 19, 2020 6:49 am

Re: Missing modules like esp, network, machine

Post by doublemcz » Tue Oct 20, 2020 8:08 am

You are right! I installed Mu and I thought it connects to the board but it really runs on the computer. When I used Putty connected to the COM port it list modules correctly! :-) Thank you and have a nice day.

Post Reply