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

Import fails due to missing decorator package in clean install #83

Closed
tmthyln opened this issue Jan 13, 2022 · 3 comments
Closed

Import fails due to missing decorator package in clean install #83

tmthyln opened this issue Jan 13, 2022 · 3 comments
Assignees

Comments

@tmthyln
Copy link

tmthyln commented Jan 13, 2022

Installing hypernetx in a clean virtual environment fails due to a missing package: decorator.

Step to reproduce (after initializing a new empty virtual environment):

pip install hypernetx

giving an error like this:

>>> import hypernetx as hnx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/__init__.py", line 7, in <module>
    from hypernetx.classes import *
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/classes/__init__.py", line 2, in <module>
    from .hypergraph import Hypergraph
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/classes/hypergraph.py", line 13, in <module>
    from hypernetx.classes.staticentity import StaticEntity, StaticEntitySet
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/classes/staticentity.py", line 10, in <module>
    from hypernetx.utils import (
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/utils/__init__.py", line 8, in <module>
    from .decorators import not_implemented_for
  File "/tmp/hnx-version/venv/lib/python3.8/site-packages/hypernetx/utils/decorators.py", line 4, in <module>
    from decorator import decorator
ModuleNotFoundError: No module named 'decorator'

Of course, installing the decorator package manually fixes the issue and hypernetx imports fine. I think the decorator package should just be added to the install_requires entry in setup.cfg and setup.py since this package is required to even load the package at all.

Tested using Python versions 3.8 and 3.9, using hypernetx 1.2.2 (on Ubuntu).

@bonicim bonicim self-assigned this Aug 1, 2022
@bonicim
Copy link
Collaborator

bonicim commented Aug 4, 2022

@tmthyln Thank you for bringing this to our attention. I also encountered this issue and will address it in the next release.

@bonicim
Copy link
Collaborator

bonicim commented Aug 18, 2022

Addressed in #91

@bonicim
Copy link
Collaborator

bonicim commented Aug 25, 2022

v1.2.5 has been uploaded to hypernetx's PyPi account. Closing this issue.

@bonicim bonicim closed this as completed Aug 25, 2022
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