girder / large_image

Python modules to work with large multiresolution images.
http://girder.github.io/large_image/
Apache License 2.0
191 stars 43 forks source link

Import of large-image module fails #300

Closed cklat closed 6 years ago

cklat commented 6 years ago

Hi,

I'm trying to get large-image running on my machine. I followed the installation instructions for the python stand-alone module. I wasn't quite sure how to install OpenSlide, so I decided to install it via pip (pip3 install openslide-python). However, I skipped installing the optional packages.

When I'm trying to import the module, it gives me the following error:

---------------------------------------------------------------------------
>>> import large_image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/christianklat/Freiburg/large_image/large_image/__init__.py", line 20, in <module>
    import server
  File "/Users/christianklat/Freiburg/HistomicsTK/server/__init__.py", line 5, in <module>
    from girder import events
ModuleNotFoundError: No module named 'girder'

Does anybody know how to fix this? Did I miss something that I should have installed? Although it's not explicitly mentioned in the instructions, I tried to install the girder 2.5.0 package via pip afterwards. With this, I get the following error message:

---------------------------------------------------------------------------
>>> import large_image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/christianklat/Freiburg/large_image/large_image/__init__.py", line 20, in <module>
    import server
  File "/Users/christianklat/Freiburg/HistomicsTK/server/__init__.py", line 16, in <module>
    from girder.plugins.slicer_cli_web.rest_slicer_cli import (
ModuleNotFoundError: No module named 'girder.plugins.slicer_cli_web'

Appreciate your help!

manthey commented 6 years ago

I suspect you installed large_image in editable mode (pip install -e . from the large_image directory). Try installing it in non-editable mode (you may have to manually remove the large_image.egg_info file if you had first installed in editable mode).

We intent to refactor how the repository is organized to fix this issue (see issued #232), but for now, if large_image is installed in editable mode it can't be imported outside of girder.

manthey commented 6 years ago

Closing as deployment works via example docker, travis, etc. Eventually this will be easier with pip installation (see also issue #232).