Xi-CAM / Xi-cam

Xi-cam is a graphical environment for synchrotron data analysis, management, and visualization developed by the Advanced Light Source at Lawrence Berkeley National Laboratory. This is a cross-platform open-source Python project licensed under BSD.
https://www.camera.lbl.gov/
Other
10 stars 7 forks source link

Pip install missing many dependencies #89

Closed ercius closed 2 years ago

ercius commented 3 years ago

Describe the bug I followed the install instructions to create a python 3.8 environment and pip install xicam. However, when I run xicam in the console nothing happens.

I then run python run_xicam.py in the environment's ../site-packages/xicam directory. I get several import errors each time I try to run_xicam.py, install needed package, run_xicam.py, etc.

Here are the missing dependencies: tiled httpx doct

At the very end I get this error:

Fri Oct 08 20:08:06 2021 - logError - ERROR - MainThread >
 The following error was handled safely by Xi-cam. It is displayed here for debugging.
Fri Oct 08 20:08:06 2021 - logError - ERROR - MainThread >
 Traceback (most recent call last):
   File "run_xicam.py", line 6, in <module>
    from xicam.core.args import parse_args
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\core\__init__.py", line 2, in <module>
    from . import formats
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\core\formats\__init__.py", line 1, in <module>
    from . import NPYPlugin
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\core\formats\NPYPlugin.py", line 4, in <module>
    from xicam.plugins.datahandlerplugin import DataHandlerPlugin, start_doc
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\plugins\__init__.py", line 25, in <module>
    from .datahandlerplugin import DataHandlerPlugin
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\plugins\datahandlerplugin.py", line 5, in <module>
    from xicam.core.data import lazyfield
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\xicam\core\data\__init__.py", line 7, in <module>
    from databroker.in_memory import BlueskyInMemoryCatalog
   File "C:\Users\linol\Anaconda3\envs\xicam_temp\lib\site-packages\databroker\in_memory.py", line 3, in <module>
    from .core import Entry, retry
 ModuleNotFoundError: No module named 'databroker.core'

I'm unable to get past this import error. Databroker is listed as version 2.0.0a16

Is there a suggested way to install xicam and the proper versions of the dependencies?

To Reproduce Steps to reproduce the behavior:

  1. conda create --name xicam python=3.8
  2. pip install xicam
  3. xicam

Expected behavior pip should install all required dependencies of the correct version

Desktop (please complete the following information):

ercius commented 3 years ago

I checked an older working install of xicam (which I have in a different environment) for versions of databroker and intake. This working xicam has databroker==1.0.2 and intake==0.5.5. I downgraded to these versions in my new environment (see above). Xicam starts correctly.

ercius commented 3 years ago

databroker recently (June 19th) added pre-releases for 2.0 on pypi. Xicam is pulling that version.

Solution: Install xicam and then run pip install databroker==1.2.4

xicam's setup.py should be pinned to databroker 1.2.4.

ronpandolfi commented 3 years ago

I've pinned it to databroker<2. https://github.com/Xi-CAM/Xi-cam/commit/4042716bd3c1eac11ea77cfcd551b018719ba515

rohandhall commented 2 years ago

Seems like the pip install still downloads databroker2. After following Peter's solution, I get rid of that error, but still need to debug further.

Also, I had to install tiled, httpx, doct into my environment manually.