这是indexloc提供的服务,不要输入任何密码
Skip to content

Cannot build xeus-python-demo #39

@connorferster

Description

@connorferster

Description

I am trying to build the xeus-python-demo locally but I am getting this strange error (extracted from much larger traceback, included below).

conda.auxlib.exceptions.ValidationError: 'emscripten' is not a valid Platform

I tried building it last night with the same result. And, after I hit this error, whenever I ran other commands in conda, e.g. conda create -n myenvname python=3.12, the commands would not run and I would get the same error! (Weird, yeah?)

Because it seemed like my miniconda3 installation was now broken, I completely removed conda (and all of my many environments), and re-installed conda anew from miniforge3 (which I had been meaning to do that anyway).

I just tried cloning the repo again fresh and installing it locally into a fresh conda environment. As before, the kernel did not install after running jupyter lite build. So I executed conda install xeus-python to install the xeus kernel into my conda environment. When I then ran jupyter lite build again, a completely different series of screens flashed by and then I got the same error as shown above (full stack trace below).

Get this! Now, again, my conda installation seems to be broken because I can no longer run conda create -n myenvname python=3.12 without it ending in the same error.

The conda-breaking part of this is probably an upstream issue as well but I could really use some guidance on what is happening here. How can I fix this? Are there any build steps I am missing?

Reproduce

  1. Install latest miniforge3 on ubuntu
  2. conda create -n jupyterlite python=3.12
  3. conda activate jupyterlite
  4. git clone https://github.com/jupyterlite/xeus-python-demo.git
  5. cd xeus-python-demo
  6. conda install jupyterlite-core
  7. jupyter lite build -> Successfully builds Jupyterlite but without kernels
  8. conda install xeus-python
  9. jupyter lite build

CRASH

(See traceback below)

Expected behavior

Jupyterlite builds with xeus-python kernel and I am enjoying an excellent piece of new technology running in my browser! (Wow)

Context

  • JupyterLite version: 0.3.0
  • Operating System and version: Pop!_OS 22.04 LTS (Ubuntu 22.04 LTS)
  • Browser and version: 6.4.3160.42 (Stable channel) stable (64-bit)
Traceback
(jupyterlite)  connorferster@pop-os  ~/code/jupyterlite-xeus-python   main ±  jupyter lite build
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.3.0.tgz 13MB
    output:          /home/connorferster/code/jupyterlite-xeus-python/_output
    lite dir:        /home/connorferster/code/jupyterlite-xeus-python
    apps:            
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
icons:icons
lite:jupyter-lite.json
mimetypes:jupyter-lite.json
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteBuildApp] No archive (yet): jupyterlite-xeus-python-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:icons:icons
    favicon files: 0 files
.  status:lite:jupyter-lite.json
[LiteBuildApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mimetypes:jupyter-lite.json
    filetypes:         26 
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 2 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
-- init:static:unpack
federated_extensions:copy:ext:jupyterlab_pygments
federated_extensions:copy:ext:@jupyterlite/xeus
.  pre_build:federated_extensions:copy:ext:jupyterlab_pygments
.  pre_build:federated_extensions:copy:ext:@jupyterlite/xeus
icons:copy
/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_core/addons/translation.py:88: UserWarning: [lite] [translation] install `jupyterlab_server` to load translations: No module named 'jupyterlab_server'
  if not self.is_sys_prefix_ignored() and has_optional_dependency(
translation:copy
.  build:icons:copy
-- build:translation:copy
federated_extensions:patch
federated_extensions:settings

Looking for: []

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

 $ mamba activate /tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel

To deactivate an active environment, use

 $ mamba deactivate

Looking for: ['xeus-python', 'forallpeople', 'ipycanvas']

https://repo.mamba.pm/emscripten-forge/emscripte.. 0.9s
https://repo.mamba.pm/emscripten-forge/noarch (c.. Checked 0.3s
warning libmamba Could not parse mod/etag header
[+] 0.3s
conda-forge/emscripten-wasm32 ━━━━━━━╸━━━━━━━━━━ 0.0 B @ ??.?MB/s 0.3s
conda-forge/emscripten-wasm32 @ ??.?MB/s 404 failed 0.3s
https://repo.mamba.pm/emscripten-forge/emscripte.. @ 74.3kB/s 0.6s
https://repo.mamba.pm/emscripten-forge/noarch 1.9kB @ 2.3kB/s 0.8s
conda-forge/noarch 15.2MB @ 18.3MB/s 0.9s
Transaction

Prefix: /tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel

Updating specs:

  • xeus-python
  • forallpeople
  • ipycanvas

Package Version Build Channel Size
──────────────────────────────────────────────────────────────────────────────────────────────────
Install:
──────────────────────────────────────────────────────────────────────────────────────────────────

  • pillow 10.3.0 hf51ec75_0 repo.mamba.pm/emscripten-forge 1MB
  • pyjs 2.1.0 py311hd5f3483_7 repo.mamba.pm/emscripten-forge 4MB
  • emscripten-abi 3.1.45 h267e887_29 repo.mamba.pm/emscripten-forge 11kB
  • python 3.11.3 h_hash_24_cpython repo.mamba.pm/emscripten-forge 13MB
  • wheel 0.43.0 pyhd8ed1ab_1 conda-forge Cached
  • setuptools 70.1.1 pyhd8ed1ab_0 conda-forge Cached
  • pip 24.0 pyhd8ed1ab_0 conda-forge Cached
  • six 1.16.0 pyh6c4a22f_0 conda-forge Cached
  • parso 0.8.4 pyhd8ed1ab_0 conda-forge Cached
  • ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge Cached
  • wcwidth 0.2.13 pyhd8ed1ab_0 conda-forge Cached
  • pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge Cached
  • executing 2.0.1 pyhd8ed1ab_0 conda-forge Cached
  • typing_extensions 4.12.2 pyha770c72_0 conda-forge Cached
  • traitlets 5.14.3 pyhd8ed1ab_0 conda-forge Cached
  • pygments 2.18.0 pyhd8ed1ab_0 conda-forge Cached
  • decorator 5.1.1 pyhd8ed1ab_0 conda-forge Cached
  • backcall 0.2.0 pyh9f0ad1d_0 conda-forge 14kB
  • xeus-python-shell-raw 0.6.3 pyhd8ed1ab_0 conda-forge 12kB
  • pickleshare 0.7.5 py_1003 conda-forge Cached
  • widgetsnbextension 4.0.11 pyhd8ed1ab_0 conda-forge 1MB
  • jupyterlab_widgets 3.0.11 pyhd8ed1ab_0 conda-forge 186kB
  • forallpeople 2.6.7 pyhd8ed1ab_0 conda-forge 36kB
  • asttokens 2.4.1 pyhd8ed1ab_0 conda-forge Cached
  • jedi 0.19.1 pyhd8ed1ab_0 conda-forge Cached
  • pexpect 4.9.0 pyhd8ed1ab_0 conda-forge Cached
  • prompt-toolkit 3.0.47 pyha770c72_0 conda-forge Cached
  • comm 0.2.2 pyhd8ed1ab_0 conda-forge Cached
  • matplotlib-inline 0.1.7 pyhd8ed1ab_0 conda-forge Cached
  • stack_data 0.6.2 pyhd8ed1ab_0 conda-forge Cached
  • numpy 2.0.0 py311hc8e14bb_0 repo.mamba.pm/emscripten-forge 7MB
  • ipython 8.25.0 py311hf215df6_1 repo.mamba.pm/emscripten-forge 2MB
  • xeus-python-shell 0.6.3 pyhd8ed1ab_0 conda-forge 7kB
  • ipywidgets 8.1.3 pyhd8ed1ab_0 conda-forge 114kB
  • ipycanvas 0.13.2 pyhd8ed1ab_0 conda-forge 57kB
  • xeus-python 0.17.0 py311h8776317_6 repo.mamba.pm/emscripten-forge 4MB

Summary:

Install: 36 packages

Total download: 33MB

──────────────────────────────────────────────────────────────────────────────────────────────────

backcall 13.7kB @ 169.7kB/s 0.1s
widgetsnbextension 1.1MB @ 5.1MB/s 0.1s
emscripten-abi 10.9kB @ 7.2kB/s 1.5s
forallpeople 35.9kB @ 21.5kB/s 0.2s
pyjs 4.0MB @ 1.3MB/s 3.1s
jupyterlab_widgets 186.5kB @ 56.9kB/s 0.1s
ipycanvas 57.1kB @ 17.1kB/s 0.1s
xeus-python-shell 6.7kB @ 2.0kB/s 0.1s
numpy 7.5MB @ 1.9MB/s 3.7s
xeus-python-shell-raw 11.7kB @ 3.0kB/s 0.1s
ipywidgets 113.8kB @ 28.4kB/s 0.1s
pillow 1.1MB @ 242.3kB/s 4.7s
python 13.2MB @ 2.5MB/s 5.3s
ipython 1.6MB @ 292.3kB/s 2.1s
xeus-python 3.8MB @ 319.8kB/s 10.3s
'emscripten' is not a valid Platform

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
    return func(*args, **kwargs)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 959, in exception_converter
    raise e
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 952, in exception_converter
    exit_code = _wrapped_main(*args, **kwargs)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 898, in _wrapped_main
    result = do_call(parsed_args, p)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 763, in do_call
    exit_code = install(args, parser, "install")
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 569, in install
    handle_txn(conda_transaction, prefix, args, newenv)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/mamba/linking.py", line 38, in handle_txn
    unlink_link_transaction.download_and_extract()
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/link.py", line 255, in download_and_extract
    self._pfe.execute()
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 771, in execute
    self.prepare()
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/common/io.py", line 85, in decorated
    return f(*args, **kwds)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 750, in prepare
    self.paired_actions.update(
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 751, in <genexpr>
    (prec, self.make_actions_for_record(prec)) for prec in largest_first
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 595, in make_actions_for_record
    extracted_pcrec = next(
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 596, in <genexpr>
    (
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 599, in <genexpr>
    PackageCacheData(pkgs_dir).query(pref_or_spec)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 166, in query
    for pcrec in self._package_cache_records.values()
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 306, in _package_cache_records
    self.load()
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 127, in load
    package_cache_record = self._make_single_record(base_name)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 369, in _make_single_record
    package_cache_record = PackageCacheRecord.from_objects(
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 790, in from_objects
    return cls(**init_vars)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 743, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/models/records.py", line 418, in __init__
    super().__init__(*args, **kwargs)
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 759, in __init__
    setattr(self, key, kwargs[key])
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 428, in __set__
    self.box(instance, instance.__class__, val),
  File "/home/connorferster/miniforge3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 570, in box
    raise ValidationError(val, msg=e1)
conda.auxlib.exceptions.ValidationError: 'emscripten' is not a valid Platform

$ /home/connorferster/miniforge3/condabin/mamba install --yes --prefix /tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel -c https://repo.mamba.pm/emscripten-forge -c conda-forge xeus-python forallpeople ipycanvas

environment variables:
CIO_TEST=
CONDARC=/tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel/.condarc
CONDA_DEFAULT_ENV=jupyterlite
CONDA_EXE=/home/connorferster/miniforge3/bin/conda
CONDA_PREFIX=/home/connorferster/miniforge3/envs/jupyterlite
CONDA_PREFIX_1=/home/connorferster/miniforge3
CONDA_PROMPT_MODIFIER=(jupyterlite)
CONDA_PYTHON_EXE=/home/connorferster/miniforge3/bin/python
CONDA_ROOT=/home/connorferster/miniforge3
CONDA_SHLVL=2
CURL_CA_BUNDLE=
DEFAULTS_PATH=/usr/share/gconf/pop.default.path
LD_PRELOAD=
MANDATORY_PATH=/usr/share/gconf/pop.mandatory.path
PATH=/home/connorferster/miniforge3/envs/jupyterlite/bin:/home/connorferste
r/miniforge3/condabin:/home/connorferster/.nvm/versions/node/v22.2.0/b
in:/home/connorferster/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/
sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lo
cal/go/bin:/home/connorferster/.repobee/bin:/opt/ParaView-
5.11/bin:/usr/local/go/bin
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=
WINDOWPATH=2

 active environment : jupyterlite
active env location : /home/connorferster/miniforge3/envs/jupyterlite
        shell level : 2
   user config file : /home/connorferster/.condarc

populated config files : /home/connorferster/miniforge3/.condarc
/tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel/.condarc
conda version : 24.3.0
conda-build version : not installed
python version : 3.10.14.final.0
solver : libmamba (default)
virtual packages : __conda=24.3.0=0
base environment : /home/connorferster/miniforge3 (writable)
conda av data dir : /home/connorferster/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://repo.mamba.pm/emscripten-forge/emscripten-wasm32
https://repo.mamba.pm/emscripten-forge/noarch
https://conda.anaconda.org/conda-forge/emscripten-wasm32
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/connorferster/miniforge3/pkgs
/home/connorferster/.conda/pkgs
envs directories : /home/connorferster/miniforge3/envs
/home/connorferster/.conda/envs
platform : emscripten-wasm32
user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Linux/6.4.6-76060406-generic pop/22.04 glibc/2.35 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
UID:GID : 1000:1000
netrc file : /home/connorferster/.netrc
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install

[LiteBuildApp] ERROR | [lite] [post_build] [jupyterlite-xeus] [ERR] Command '['/home/connorferster/miniforge3/condabin/mamba', 'install', '--yes', '--prefix', PosixPath('/tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel'), '-c', 'https://repo.mamba.pm/emscripten-forge', '-c', 'conda-forge', 'xeus-python', 'forallpeople', 'ipycanvas']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/doit_cmd.py", line 294, in run
return command.parse_execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/cmd_base.py", line 150, in parse_execute
return self.execute(params, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/cmd_base.py", line 570, in execute
return self._execute(**exec_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/cmd_run.py", line 265, in _execute
return runner.run_all(self.control.task_dispatcher())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/runner.py", line 254, in run_all
self.run_tasks(task_dispatcher)
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/runner.py", line 213, in run_tasks
node = task_dispatcher.generator.send(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/control.py", line 629, in _dispatcher_generator
next_step = node.step()
^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/control.py", line 336, in step
return next(self.generator)
^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/control.py", line 345, in _func
for value in decorated(*args, **kwargs):
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/control.py", line 473, in _add_task
new_tasks = generate_tasks(to_load, task_gen, ref.doc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/loader.py", line 390, in generate_tasks
for task_dict, x_doc in flat_generator(gen_result, gen_doc):
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/doit/loader.py", line 27, in flat_generator
for item in gen:
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 138, in _delayed_gather
yield from _gather()
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 131, in _gather
raise error
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 123, in _gather
for task in getattr(addon, attr)(self):
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 124, in post_build
self.create_prefix()
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 148, in create_prefix
create_conda_env_from_env_file(root_prefix, yaml_content, env_file.parent)
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 53, in create_conda_env_from_env_file
create_conda_env_from_specs(
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 69, in create_conda_env_from_specs
_create_conda_env_from_specs_impl(
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 126, in _create_conda_env_from_specs_impl
return _create_env_with_config(MAMBA_COMMAND, prefix_path, specs, channels_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 144, in _create_env_with_config
subprocess_run(
File "/home/connorferster/miniforge3/envs/jupyterlite/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/connorferster/miniforge3/condabin/mamba', 'install', '--yes', '--prefix', PosixPath('/tmp/tmpwsk5p5rz/env/envs/xeus-python-kernel'), '-c', 'https://repo.mamba.pm/emscripten-forge', '-c', 'conda-forge', 'xeus-python', 'forallpeople', 'ipycanvas']' returned non-zero exit status 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions