mapbox / mapbox/mapboxgl-jupyter

Mapboxgl cannot be imported on Windows 10 after conda install

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
681
Forks
137
PR merge metrics
No merged PRs in 30d

Description

I installed mapboxgl from conda-forge, but when I try to import it (or anything from it), I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\manow\miniconda3\envs\py37_test\lib\site-packages\mapboxgl\__init__.py", line 1, in <module>
    from .viz import CircleViz, GraduatedCircleViz, HeatmapViz, ClusteredCircleViz, ImageViz, RasterTilesViz, ChoroplethViz, LinestringViz
  File "C:\Users\manow\miniconda3\envs\py37_test\lib\site-packages\mapboxgl\viz.py", line 12, in <module>
    from mapboxgl import templates
  File "C:\Users\manow\miniconda3\envs\py37_test\lib\site-packages\mapboxgl\templates.py", line 4, in <module>
    loader=PackageLoader('mapboxgl', 'templates'),
  File "C:\Users\manow\miniconda3\envs\py37_test\lib\site-packages\jinja2\loaders.py", line 324, in __init__
    f"The {package_name!r} package was not installed in a"
ValueError: The 'mapboxgl' package was not installed in a way that PackageLoader understands.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mapboxgl/init.py, mapboxgl/viz.py, and mapboxgl/templates.py, then inspect how the conda-forge package includes the templates directory. Reproduce the import failure on Windows 10 with the reported conda installation and verify that importing mapboxgl succeeds without the PackageLoader error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.