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

[Bug]: build failure pydeck #8469

Open
1 of 7 tasks
natsukium opened this issue Feb 3, 2024 · 6 comments
Open
1 of 7 tasks

[Bug]: build failure pydeck #8469

natsukium opened this issue Feb 3, 2024 · 6 comments
Milestone

Comments

@natsukium
Copy link

Description

I can't install pydeck from the source due to an invalid pyproject.toml. See #6777 (comment)
And unfortunately, the CI was fixed in the wrong way in #7198

We should remove the deprecated setup.py develop and prepare the correct pyproject.toml or otherwise remove it until it is ready.
https://setuptools.pypa.io/en/latest/deprecated/commands.html#running-setuptools-commands

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

install pydeck without failure

Steps to Reproduce

docker run --rm -it python:3.11-slim bash
apt update && apt install -y git
git clone https://github.com/visgl/deck.gl
cd deck.gl/bindings/pydeck
pip install .

I followed this guide but without yarn, since this failure is not related to it.

Environment

  • Framework version:
  • Browser:
  • OS: Ubuntu

Logs

!!
        _handle_missing_dynamic(dist, project_table)
      Traceback (most recent call last):
        File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 175, in <module>
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 159, in setup
          dist.parse_config_files()
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 627, in parse_config_files
          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 67, in apply_configuration
          return _apply(dist, config, filepath)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 56, in apply
          _apply_project_table(dist, config, root_dir)
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 82, in _apply_project_table
          corresp(dist, value, root_dir)
        File "/tmp/pip-build-env-649qibkf/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 163, in _long_description
          file = val.get("file") or []
                 ^^^^^^^
      AttributeError: 'NoneType' object has no attribute 'get'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy added this to the v9.0 milestone Mar 29, 2024
@donmccurdy
Copy link
Collaborator

donmccurdy commented Apr 1, 2024

I'm trying to resolve the broken local builds, and have perhaps made some progress, but I'm hitting other errors. Removing pyproject.toml does not seem to solve the issues for me. Sharing progress here in case others have ideas.

  1. Start a clean virtual env, on macOS:

    make setup-env
    . env/bin/activate
    
  2. Run make init

Caution

Jupyter command jupyter-nbextension not found.

  1. Edit bindings/pydeck/requirements/requirements-dev.txt to set jupyterlab<4.0.0

  2. Run make init again

  3. Run make prepare-jupyter

Warning

(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages
(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages

We'll ignore this for now. We currently don't support JupyterLab v4, and v3 reaches EOL next month, according to jupyterlab/jupyterlab#15921. See #7030 for steps required to update to JupyterLab v4 — the migration appears non-trivial.

  1. Run jupyter notebook, open "01 Introduction" in examples/, and run all cells.

The first few cells complete, until we get to r.show(). Here we fail with JavaScript errors:

Screenshot 2024-04-01 at 4 04 58 PM

I'm not sure how to work around this part yet. My guess is that perhaps I need to roll back some other dependencies in requirements.txt or requirements-dev.txt, but I don't know which ones. If anyone currently has local builds working and would like to share the versions of dependencies you have installed (pip freeze) that might be helpful.

@donmccurdy
Copy link
Collaborator

I also tried running pypi-timemachine, which runs a local PyPi registry hiding any packages newer than the specified date. Testing an installation locked to <= 2023-01-01, the errors are essentially the same. I'm not sure pypi-timemachine affects nbextension extension installations, so maybe that's just not going to work here.

One other clue, notebooks are generating HTML/JS output like this...

    const tooltip = True; // 🛑 should be 'true', not 'True'!
    const customLibraries = null;
    const configuration = null;

... if that narrows down which dependency might be causing the problem. 😕

@donmccurdy
Copy link
Collaborator

Partial fix coming in #8756. Still working on the runtime errors above.

@donmccurdy
Copy link
Collaborator

Additional fix in #8780. The const tooltip = True error is fixed. Errors from the widget bindings remain, and prevent .show() from working, but .to_html() now renders the map.

@donmccurdy
Copy link
Collaborator

Current state of debugging, known errors, and known workarounds in:

https://gist.github.com/donmccurdy/4cb069e73cbb82b6e5f75a0b3a6bb74f

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

3 participants