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

Python 2.7 support? #55

Closed
sweh opened this issue Jan 24, 2018 · 2 comments
Closed

Python 2.7 support? #55

sweh opened this issue Jan 24, 2018 · 2 comments

Comments

@sweh
Copy link
Contributor

sweh commented Jan 24, 2018

Hi there,

under Python2.7 I get the following error:

$ virtualenv --python=python2.7 test
$ bin/pip install mt-940
Successfully installed mt-940-4.10.0 pyyaml-3.12
$ bin/pip install enum
Successfully installed enum-0.4.6
$ bin/python
>>> import mt940
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sweh/dev/test/lib/python2.7/site-packages/mt940/__init__.py", line 3, in <module>
    from . import tags
  File "/Users/sweh/dev/test/lib/python2.7/site-packages/mt940/tags.py", line 369, in <module>
    @enum.unique
AttributeError: 'module' object has no attribute 'unique'

mt-940 does not declare enum as a dependency for Python2.7, so one has to install it by hand (which is not a big deal though).

If you hint me to a solution I could hand over a pull request.

Kind regards,
Sebastian

@sweh
Copy link
Contributor Author

sweh commented Jan 24, 2018

Ok, I figured out that I used the wrong enum package. enum34 is the right to use under Python 2.7.

@sweh
Copy link
Contributor Author

sweh commented Jan 24, 2018

So the package is required in the setup.py correctly. Looks like something in my environment did not work so the requirement was not installed correctly. Closing this issue as the problem is on my side.

@sweh sweh closed this as completed Jan 24, 2018
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

1 participant