bio2bel / reactome

Integration of pathway-related information from Reactome in BEL
http://bio2bel-reactome.rtfd.io
MIT License
5 stars 1 forks source link

Cann't import bio2bel_reactome #16

Closed charalamm closed 3 years ago

charalamm commented 4 years ago

Python 3.6.9 Ubuntu 18.04

installing with pip3 install bio2bel_reactome raises the following error

>>> import bio2bel_reactome

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_reactome/__init__.py", line 19, in <module>
    from .manager import Manager
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_reactome/manager.py", line 18, in <module>
    from compath_utils import CompathManager
  File "/usr/local/lib/python3.6/dist-packages/compath_utils/__init__.py", line 42, in <module>
    from compath_utils.manager import *  # noqa: F401, F403
  File "/usr/local/lib/python3.6/dist-packages/compath_utils/manager.py", line 29, in <module>
    class CompathManager(AbstractManager, BELNamespaceManagerMixin, BELManagerMixin, FlaskMixin):
  File "/usr/local/lib/python3.6/dist-packages/compath_utils/manager.py", line 92, in CompathManager
    def get_protein_by_hgnc_symbol(self, hgnc_symbol: str) -> Optional[CompathProtein]:
  File "/usr/lib/python3.6/typing.py", line 682, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.6/typing.py", line 846, in __getitem__
    return Union[arg, type(None)]
  File "/usr/lib/python3.6/typing.py", line 682, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.6/typing.py", line 803, in __getitem__
    return self.__class__(parameters, origin=self, _root=True)
  File "/usr/lib/python3.6/typing.py", line 743, in __new__
    parameters = _remove_dups_flatten(parameters)
  File "/usr/lib/python3.6/typing.py", line 647, in _remove_dups_flatten
    for t2 in all_params - {t1}
  File "/usr/lib/python3.6/typing.py", line 649, in <genexpr>
    t2.__origin__ is not None)):
  File "/usr/lib/python3.6/abc.py", line 227, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument

Installing with pip3 install git+https://github.com/bio2bel/reactome.git raises this error:

>>> import bio2bel_reactome

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_reactome/__init__.py", line 18, in <module>
    from .manager import Manager
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_reactome/manager.py", line 5, in <module>
    import bio2bel_chebi
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_chebi/__init__.py", line 41, in <module>
    from .manager import *
  File "/usr/local/lib/python3.6/dist-packages/bio2bel_chebi/manager.py", line 15, in <module>
    from bio2bel.manager.namespace_manager import BELNamespaceManagerMixin
  File "/usr/local/lib/python3.6/dist-packages/bio2bel/manager/namespace_manager.py", line 16, in <module>
    from pybel.resources import write_namespace
ImportError: cannot import name 'write_namespace'

Is there something I could do?

Thank you!

cthoyt commented 4 years ago

Hi @charalamm I've been working on an update to this package. I just realized it didn't have a PR. Now it's at #17. I hope this solves your issue (once it's merged)

However, you're running quite an old version of python - this will be a problem since the newest versions of Bio2BEL and Bio2BEL-Reactome have been Python 3.7+

charalamm commented 4 years ago

So I should just redo pip3 install git+https://github.com/bio2bel/reactome.git?

Thank you for replying!!

cthoyt commented 3 years ago

Closed by #17