Kepler.gl: Error install keplergl jupyter widget in windows: Failed building wheel

Created on 14 Jun 2019  ·  19Comments  ·  Source: keplergl/kepler.gl

There seems to be an issue when I try to install keplergl-jupyter. I ran pip install keplergl-jupyter in the anaconda prompt and got the following error.

image

There was also a Failed building wheel for keplergl-jupyter error.

Please let me know the right way to download and use this module in Jupyter Notebooks. Thanks!

I am using the Windows OS.

jupyter

Most helpful comment

I followed @victorfgs 's advice and made it!
But it took me 2 hours to figure out how to "manually" install these three packages.
I hope the following notes would help some start-up programmers like me to save your time.

System: win10

Note 1: Install "manually" does not mean install the ".whl" files to your python library folder!

Note 2: Make sure you have "wheel" in pip lib. pip install wheel

Note 3: Verify the correct version of packages for your pip. Run following code in python to figure out which version of wheel to install: cpxx. Mine is "cp37".
AMD64: import pip._internal;print(pip._internal.pep425tags.get_supported())
win32: import pip; print(pip.pep425tags.get_supported())

Note 4: Go to sharpely/gdal/fiona to download ".whl" file, which supports your pip version. Mine are "{PackageName}‑3.0.1‑cp37‑cp37m‑win_amd64.whl"

Note 5: Get the absolute path of your ".whl" file (careful with "\"). And run pip install path_of_whl_file

Note 6: After you successfully download above packages, you can easily install keplergl by running pip install keplergl

All 19 comments

This seems to only happen in anaconda, found a similar issue here
https://github.com/htrc/HTRC-WorksetToolkit/issues/19

Possible fix is to remove the end / in setup.py

@ruvenguna can you try install keplergl==0.1.0a6 in anaconda?

Hi @heshan0131 ,
I'm trying to install keplergl for jupyter on Windows OS and I'm facing the following problem:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting keplergl Using cached https://files.pythonhosted.org/packages/a0/78/3ec18827bf9f1a9ab19f348ae1704cd89bf8791616d00c798d1d76403272/keplergl-0.1.0a7.tar.gz Requirement already satisfied: ipywidgets<8,>=7.0.0 in c:\users\pc\anaconda2\lib\site-packages (from keplergl) (7.4.2) Collecting traittypes>=0.2.1 (from keplergl) Using cached https://files.pythonhosted.org/packages/9c/d1/8d5bd662703cc1764d986f6908a608777305946fa634d34c470cd4a1e729/traittypes-0.2.1-py2.py3-none-any.whl Collecting geopandas>=0.5.0 (from keplergl) Using cached https://files.pythonhosted.org/packages/21/80/da2a33c9201cd4ce693f4aa6189efc9ef1a48bec1c3b02c3ce9908b07fec/geopandas-0.5.1-py2.py3-none-any.whl Requirement already satisfied: pandas>=0.23.0 in c:\users\pc\anaconda2\lib\site-packages (from keplergl) (0.24.2) Collecting Shapely>=1.6.4.post2 (from keplergl) Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\pc\appdata\local\temp\pip-install-f3rerg\Shapely\setup.py", line 80, in <module> from shapely._buildcfg import geos_version_string, geos_version, \ File "shapely\_buildcfg.py", line 200, in <module> lgeos = CDLL("geos_c.dll") File "c:\users\pc\anaconda2\lib\ctypes\__init__.py", line 366, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found ---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in c:\users\pc\appdata\local\temp\pip-install-f3rerg\Shapely\

Sorry, I am not a programmer I have been programming in python for a short time, please can you give me more suggestions about how to modify the setup.py file?

I tried also to install Jupyter and keplergl outside the anaconda environment and this is what I get:

C:\Python27\ArcGIS10.6>pip install keplergl Collecting keplergl Using cached https://files.pythonhosted.org/packages/a0/78/3ec18827bf9f1a9ab19f348ae1704cd89bf8791616d00c798d1d76403272/keplergl-0.1.0a7.tar.gz Requirement already satisfied: ipywidgets<8,>=7.0.0 in c:\a1_python\lib\site-packages (from keplergl) (7.5.0) Collecting traittypes>=0.2.1 (from keplergl) Using cached https://files.pythonhosted.org/packages/9c/d1/8d5bd662703cc1764d986f6908a608777305946fa634d34c470cd4a1e729/traittypes-0.2.1-py2.py3-none-any.whl Collecting geopandas>=0.5.0 (from keplergl) Downloading https://files.pythonhosted.org/packages/21/80/da2a33c9201cd4ce693f4aa6189efc9ef1a48bec1c3b02c3ce9908b07fec/geopandas-0.5.1-py2.py3-none-any.whl (893kB) |████████████████████████████████| 901kB 726kB/s Requirement already satisfied: pandas>=0.23.0 in c:\a1_python\lib\site-packages (from keplergl) (0.24.2) Collecting Shapely>=1.6.4.post2 (from keplergl) Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\pc\AppData\Local\Temp\pip-install-6zw112rm\Shapely\setup.py", line 80, in <module> from shapely._buildcfg import geos_version_string, geos_version, \ File "C:\Users\pc\AppData\Local\Temp\pip-install-6zw112rm\Shapely\shapely\_buildcfg.py", line 200, in <module> lgeos = CDLL("geos_c.dll") File "c:\a1_python\lib\ctypes\__init__.py", line 356, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found ---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\pc\AppData\Local\Temp\pip-install-6zw112rm\Shapely\

Thanks in advance

just had the same issue on Windows 10 here @GennyGeo
solved by:

  • installing shapely manually;
  • installing gdal manually
  • installing fiona manually

hope you can make it work too ;)

I followed @victorfgs 's advice and made it!
But it took me 2 hours to figure out how to "manually" install these three packages.
I hope the following notes would help some start-up programmers like me to save your time.

System: win10

Note 1: Install "manually" does not mean install the ".whl" files to your python library folder!

Note 2: Make sure you have "wheel" in pip lib. pip install wheel

Note 3: Verify the correct version of packages for your pip. Run following code in python to figure out which version of wheel to install: cpxx. Mine is "cp37".
AMD64: import pip._internal;print(pip._internal.pep425tags.get_supported())
win32: import pip; print(pip.pep425tags.get_supported())

Note 4: Go to sharpely/gdal/fiona to download ".whl" file, which supports your pip version. Mine are "{PackageName}‑3.0.1‑cp37‑cp37m‑win_amd64.whl"

Note 5: Get the absolute path of your ".whl" file (careful with "\"). And run pip install path_of_whl_file

Note 6: After you successfully download above packages, you can easily install keplergl by running pip install keplergl

Thank you very much @victorfgs @ricardoCyy !!! I will try to follow your advice!
Have a nice day! :)

Created a FR to publish to conda, will this help?

646

非常感谢,安装没有出错了,但在jupyter中无法执行,显示没有找到指定模块,求解!!!
image

非常感谢,安装没有出错了,但在jupyter中无法执行,显示没有找到指定模块,求解!!!
image

install fiona

版本问题 解决了谢谢

I have meet the same questions .when I install keplergl in anaconda, my os is windows10.
My solution to the problem is:

  1. Create a new virtual environment via conda.
  2. Manually download and install the sharpely/gdal/fiona package as directed by victorfgs and ricardoCyy.
  3. When running the import kelpergl module in the jupyter notebook, the same problem as bosges occurred.
  4. Run the conda install fiona command in the virtual environment to reinstall fiona and its related packages.
    Restart the virtual environment in the jupyter notebook and you're done.

Since I am just a python enthusiast, not a professional, the method is not necessarily good, but I still hope that this experience is useful to everyone.

screenshot-localhost_8890-2019 09 18-10_34_57

I followed @victorfgs 's advice and made it!
But it took me 2 hours to figure out how to "manually" install these three packages.
I hope the following notes would help some start-up programmers like me to save your time.

System: win10

Note 1: Install "manually" does not mean install the ".whl" files to your python library folder!

Note 2: Make sure you have "wheel" in pip lib. pip install wheel

Note 3: Verify the correct version of packages for your pip. Run following code in python to figure out which version of wheel to install: cpxx. Mine is "cp37".
AMD64: import pip._internal;print(pip._internal.pep425tags.get_supported())
win32: import pip; print(pip.pep425tags.get_supported())

Note 4: Go to sharpely/gdal/fiona to download ".whl" file, which supports your pip version. Mine are "{PackageName}‑3.0.1‑cp37‑cp37m‑win_amd64.whl"

Note 5: Get the absolute path of your ".whl" file (careful with ""). And run pip install path_of_whl_file

Note 6: After you successfully download above packages, you can easily install keplergl by running pip install keplergl

U save my time!!!! Thanks

  1. 通过conda创建一个新的虚拟环境。

只需要把gdal的版本改下,改成2.4.1那个就行了

I followed the instructions and it worked perfectly! Thanks!

I followed all the steps suggested but every time I try to import keplergl, DLL failed appear as @bosges.
I manually install from wheel, update all packages but never changes. I also tried to install keplergl==0.1.0a6 as @heshan0131 heshan0131 suggested

`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in
----> 1 from keplergl import KeplerGl

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packages\keplergl__init__.py in
1 from ._version import version_info, __version__
2
----> 3 from .keplergl import *
4
5 def _jupyter_nbextension_paths():

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packages\keplergl\keplergl.py in
3 from traitlets import Unicode, Dict, Int, validate, TraitError
4 import pandas as pd
----> 5 import geopandas
6 import shapely.wkt
7 import json

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packages\geopandas__init__.py in
3 from geopandas.array import _points_from_xy as points_from_xy
4
----> 5 from geopandas.io.file import read_file
6 from geopandas.io.sql import read_postgis
7 from geopandas.tools import sjoin

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packages\geopandasiofile.py in
2 from distutils.version import LooseVersion
3
----> 4 import fiona
5 import numpy as np
6

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packagesfiona__init__.py in
85 pass
86
---> 87 from fiona.collection import BytesCollection, Collection
88 from fiona.drvsupport import supported_drivers
89 from fiona.env import ensure_env_with_credentials, Env

C:\Users\bianc\Documents\software\WPy64-3741\python-3.7.4.amd64\lib\site-packagesfiona\collection.py in
7
8 from fiona import compat, vfs
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
10 from fiona.ogrext import Session, WritingSession
11 from fiona.ogrext import buffer_to_virtual_file, remove_virtual_file, GEOMETRY_TYPES

ImportError: DLL load failed: Impossibile trovare il modulo specificato.`

ModuleNotFoundError: No module named 'keplergl'

error

I can't install keplergl library in anaconda & spyder.
So can you help me?

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BioBricoleur picture BioBricoleur  ·  3Comments

treyhakanson picture treyhakanson  ·  5Comments

tbicr picture tbicr  ·  5Comments

itch96 picture itch96  ·  6Comments

ChunhongZhao picture ChunhongZhao  ·  4Comments