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

No custom packages can be added during build #28

Closed
Tracked by #18
michaelweinold opened this issue Aug 20, 2023 · 2 comments
Closed
Tracked by #18

No custom packages can be added during build #28

michaelweinold opened this issue Aug 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@michaelweinold
Copy link

(not sure if this should be moved to xeus-python or jupyterlite)

Description

I cannot add custom packages as described by "📦 How to install extra packages". numpy seems to load correctly in all attempts, but all other packages are missing:

  __  _____ _   _ ___
  \ \/ / _ \ | | / __|
   >  <  __/ |_| \__ \
  /_/\_\___|\__,_|___/
​
  xeus-python: a Jupyter kernel for Python
  Python 3.10.2

import numpy

import pandas

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 import pandas

ModuleNotFoundError: No module named 'pandas'

Reproduce

  1. Add a few packages from emscripten-forge to the environment.yml file:
name: xeus-python-kernel
channels:
  - https://repo.mamba.pm/emscripten-forge
  - https://repo.mamba.pm/conda-forge
dependencies:
  - ipycanvas
  - lxml
  - peewee
  - numpy
  - pandas
  1. Push to trigger GH Action workflow.

You can see that the workflow completes successfully in the test repo I created.

Expected behavior

Custom packages are available to the kernel.

Context

  • JupyterLite version: 0.1.1
  • Operating System and version: macOS 13.5.1 (22G90)
  • Browser and version: Version 115.0.5790.170 (Official Build) (arm64)

It seems that not a single one of my requested packages were added during the build process:

help("modules")

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

/lib/python3.10/pkgutil.py:92: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
  __import__(info.name)
IPython             ast                 imghdr              sched
__future__          asttokens           imp                 secrets
_abc                asynchat            importlib           select
_aix_support        asyncio             inspect             selectors
_ast                asyncore            io                  shelve
_bisect             atexit              ipaddress           shlex
_blake2             audioop             itertools           shutil
_bootsubprocess     backcall            jedi                signal
_bz2                backports           json                site
_codecs             base64              keyword             six
_codecs_cn          bdb                 linecache           smtpd
_codecs_hk          binascii            locale              smtplib
_codecs_iso2022     binhex              logging             sndhdr
_codecs_jp          bisect              lzma                socket
_codecs_kr          builtins            mailbox             socketserver
_codecs_tw          bz2                 mailcap             sqlite3
_collections        cProfile            marshal             sre_compile
_collections_abc    calendar            math                sre_constants
_compat_pickle      cgi                 matplotlib_inline   sre_parse
_compression        cgitb               mimetypes           ssl
_contextvars        chunk               mmap                stack_data
_crypt              cmath               modulefinder        stat
_csv                cmd                 multiprocessing     statistics
_ctypes             code                netrc               string
_ctypes_test        codecs              nntplib             stringprep
_datetime           codeop              ntpath              struct
_decimal            collections         nturl2path          subprocess
_functools          colorsys            numbers             sunau
_heapq              compileall          numpy               symtable
_imp                concurrent          opcode              sys
_io                 configparser        operator            sysconfig
_json               contextlib          optparse            tabnanny
_locale             contextvars         os                  tarfile
_lsprof             copy                parso               telnetlib
_markupbase         copyreg             pathlib             tempfile
_md5                crypt               pdb                 textwrap
_multibytecodec     csv                 pexpect             this
_operator           ctypes              pickle              threading
_pickle             dataclasses         pickleshare         time
_posixsubprocess    datetime            pickletools         timeit
_py_abc             decimal             pip                 token
_pydecimal          decorator           pipes               tokenize
_pyio               difflib             pkg_resources       trace
_queue              dis                 pkgutil             traceback
_random             distutils           platform            tracemalloc
_sha1               doctest             plistlib            traitlets
_sha256             email               poplib              tty
_sha3               encodings           posix               types
_sha512             enum                posixpath           typing
_signal             errno               pprint              unicodedata
_sitebuiltins       executing           profile             urllib
_socket             faulthandler        prompt_toolkit      uu
_sqlite3            filecmp             pstats              uuid
_sre                fileinput           pty                 warnings
_stat               fnmatch             ptyprocess          wave
_string             fractions           pure_eval           wcwidth
_strptime           ftplib              py_compile          weakref
_struct             functools           pyclbr              wheel
_symtable           gc                  pydoc               wsgiref
_sysconfigdata__emscripten_wasm32-emscripten genericpath         pydoc_data          xdrlib
_thread             getopt              pyexpat             xeus_python_shell
_threading_local    getpass             pygments            xml
_tracemalloc        gettext             pyjs                xmlrpc
_warnings           glob                pyparsing           xxsubtype
_weakref            graphlib            queue               zipapp
_weakrefset         gzip                quopri              zipfile
_xxsubinterpreters  hashlib             random              zipimport
abc                 heapq               re                  zlib
aifc                hmac                reprlib             zoneinfo
antigravity         html                requests            
argparse            http                rlcompleter         
array               imaplib             runpy               

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
Browser Output
Paste the output from your browser Javascript console here.
@DerThorsten
Copy link

I'll have a look next week, thanks for reporting this

@michaelweinold michaelweinold changed the title No custom packages are be added during build No custom packages can be added during build Aug 20, 2023
@martinRenou
Copy link
Member

I could report, it was related to emscripten-forge/empack#78. This should be fixed with empack 3.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants