Python36 enum34 issue
See original GitHub issueI’m attempting to build a project using the Python36 interpreter, and there’s a package that calling for enum34, and I can’t figure out how to prevent it from being installed. Any suggestion regarding which of the built in packages are calling for this or how to prevent it from being installed?
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/jmeekho/projects/vof/mail-extract/build/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 6, in <module>
import distutils.core
File "/Users/jmeekho/projects/vof/mail-extract/build/venv/lib/python3.6/distutils/__init__.py", line 4, in <module>
import imp
File "/Users/jmeekho/projects/vof/mail-extract/build/venv/lib/python3.6/imp.py", line 27, in <module>
import tokenize
File "/Users/jmeekho/projects/vof/mail-extract/build/venv/lib/python3.6/tokenize.py", line 33, in <module>
import re
File "/Users/jmeekho/projects/vof/mail-extract/build/venv/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
plugins {
id 'com.linkedin.python-cli' version '0.9.9'
}
python {
testDir = file("tests")
details.pythonVersion = '3.6'
details.systemPythonInterpreter = '/usr/local/bin/python3.6'
}
project.tasks.findByName('installPythonRequirements').sorted = false
dependencies {
python 'pypi:DateTime:4.3'
python('pypi:exchangelib:1.12.1') {
exclude module: 'enum34'
}
}
repositories {
ivy {
name 'pypi-local' //optional, but nice
url './repo'
layout "pattern", {
ivy "[organisation]/[module]/[revision]/[module]-[revision].ivy"
artifact "[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
m2compatible = true
}
}
pyGradlePyPi()
}
python.cli.generateCompletions = true
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Installing enum34 on Python 3.x breaks pip for Python3.x
Just delete the package from your site-packages folder manually. Locate it first: python3.6 -c 'import enum; print(enum.__file__)'.
Read more >[solved] enum34 failed to install - Gentoo Forums :: View topic
emerge -1 enum34 fails with following messages: ... File "/usr/lib/portage/python3.6/doins.py", line 14, in <module> import argparse
Read more >enum34 - PyPI
An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by...
Read more >Why Python 3.6.1 throws AttributeError: module 'enum' has no ...
It's because your enum is not the standard library enum module. You probably have the package enum34 installed. One way check if this...
Read more >[Example code]-python3.6 and enum module issue in MAC OS
from enum import Enum. How can I overcome this issue with python 3 version? Note : I do not have enum34 module installed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using an earlier
forcedVersion
did the trick. Thanks.Workarounds:
python { ... }
closure:forceVersion("pypi", "flake8", "3.2.1")
if you can use lower version of flake8. It seems that versions below 3.3.0 did not have that dependency.Notice that there’s nothing wrong here with the flake8 itself. It declares the dependency conditionally in its Python package metadata. It’s the Ivy format used by Gradle that has no notion of conditional dependencies that’s at fault. So, the full solution would be porting our plugins mentioned above.
I hope this helps you.