Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cann't import bio2bel_reactome #16

Closed
charalamm opened this issue May 16, 2020 · 3 comments
Closed

Cann't import bio2bel_reactome #16

charalamm opened this issue May 16, 2020 · 3 comments

Comments

@charalamm
Copy link

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
Copy link
Member

cthoyt commented May 16, 2020

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
Copy link
Author

charalamm commented May 17, 2020

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

Thank you for replying!!

@cthoyt
Copy link
Member

cthoyt commented Nov 18, 2020

Closed by #17

@cthoyt cthoyt closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants