JeffersonLab / ccdb

Jefferson Lab Calibration and Conditions Database (CCDB)
8 stars 14 forks source link

ccdb -i no go, ccdb 2.00 #78

Closed markito3 closed 1 year ago

markito3 commented 3 years ago

This is on Fedora 33.

$ ccdb -i
Traceback (most recent call last):
  File "/home/marki/git/ccdb/bin/ccdb", line 4, in <module>
    import ccdb
  File "/home/marki/git/ccdb/python/ccdb/__init__.py", line 24, in <module>
    from .provider import AlchemyProvider
  File "/home/marki/git/ccdb/python/ccdb/provider.py", line 12, in <module>
    from .model import CcdbSchemaVersion
  File "/home/marki/git/ccdb/python/ccdb/model.py", line 4, in <module>
    from sqlalchemy import text
ImportError: No module named sqlalchemy

Am I missing a Python module?

DraTeots commented 3 years ago

Workaround is to

pip install --user --upgrade sqlalchemy pymysql six 

To check and to fix this

python/ccdb/init.py#55

Initially CCDB shipped the libraries with it. In order to put CCDB on pypi (so one could do pip install ccdb) those libraries should be used from system. The check happens in python/ccdb/init.py and sys.path.append happens to use embedded libraries. This should be checked (and fixed) to solve this issue

DraTeots commented 1 year ago

Fixed in v2-main