OpenGeoscience / geonotebook

A Jupyter notebook extension for geospatial visualization and analysis
Apache License 2.0
1.08k stars 141 forks source link

ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory #159

Closed A108669 closed 6 years ago

A108669 commented 6 years ago

I am attempting to install geonotebook on ubuntu 16.04 following the installation instructions instructions in the readme

I have successfully installed the prerequirements and requirements

pip install -r prerequirements.txt
pip install -r requirements.txt
pip install .

When I attempt to activate the extensions with the following I run into errors:

jupyter serverextension enable --sys-prefix --py geonotebook
jupyter nbextension enable --sys-prefix --py geonotebook

Errors:

 ubuntu@ip-10-0-10-155:~/jpeg-8d$ jupyter nbextension enable --sys-prefix --py geonotebook
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/python2/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 969, in start
    super(NBExtensionApp, self).start()
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 877, in start
    self.toggle_nbextension_python(self.extra_args[0])
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 853, in toggle_nbextension_python
    logger=self.log)
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 459, in enable_nbextension_python
    logger=logger)
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 374, in _set_nbextension_state_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/notebook/nbextensions.py", line 1140, in _get_nbextension_metadata
    m = import_item(module)
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/utils/importstring.py", line 42, in import_item
    return __import__(parts[0])
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/__init__.py", line 6, in <module>
    from .config import Config
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/config.py", line 79, in <module>
    Config.register_vis_server(ep.name, ep.load())
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 2258, in load
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 2264, in resolve
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/vis/__init__.py", line 1, in <module>
    from .geoserver import Geoserver
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/vis/geoserver/__init__.py", line 1, in <module>
    from .geoserver import Geoserver
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/vis/geoserver/geoserver.py", line 4, in <module>
    from geonotebook.wrappers import RasterData
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/wrappers/__init__.py", line 1, in <module>
    from .raster import RasterData, RasterDataCollection
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/wrappers/raster.py", line 177, in <module>
    RasterData.discover_concrete_types()
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/wrappers/raster.py", line 29, in discover_concrete_types
    cls.register(ep.name, ep.load())
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 2258, in load
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 2264, in resolve
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/geonotebook/wrappers/file_reader.py", line 8, in <module>
    import rasterio as rio
  File "/home/ubuntu/anaconda3/envs/python2/lib/python2.7/site-packages/rasterio/__init__.py", line 15, in <module>
    from rasterio._base import (
ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

I am having a heck of a time tracking down what libjpeg.so.8 is and now to install it. Do you have any context that many help me out?

A108669 commented 6 years ago

Found a fix:

sudo apt-get install libjpeg-turbo8
dorukozturk commented 6 years ago

A similar issue is posted here. I am glad you figured it out.

bhaprayan commented 5 years ago

That or compiling from source works too: http://www.ijg.org/files/ Make sure to use jpegsrc.v8.tar.gz if you're on a Unix like system though (jpegsr8.zip appears to be the MS version, throws all standard formatting errors while building :/ )