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

colin commands fail with "The 'enum34' distribution was not found and is required by conu" #132

Closed
dharmit opened this issue May 23, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@dharmit
Copy link

dharmit commented May 23, 2018

I just installed colin on Fedora 28 system. Every colin command fails for me with The 'enum34' distribution was not found and is required by conu.

$ colin -h
Traceback (most recent call last):
  File "/usr/bin/colin", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'enum34' distribution was not found and is required by conu

However, I already have python2-enum34-1.1.6-4.fc28.noarch installed. Installing enum34 using below command fixes it:

$ pip3 install --user enum34

Version of various packages on my Fedora 28 system:

$ rpm -qa | grep colin
colin-0.0.4-3.fc28.noarch
python3-colin-0.0.4-3.fc28.noarch

$ which colin
/usr/bin/colin

$ rpm -qa | grep conu
python3-conu-0.3.1-1.fc28.noarch

$ rpm -qa | grep docker
docker-1.13.1-51.git4032bd5.fc28.x86_64
python3-docker-3.2.1-1.fc28.noarch
docker-common-1.13.1-51.git4032bd5.fc28.x86_64
python3-dockerfile-parse-0.0.10-1.fc28.noarch
docker-rhel-push-plugin-1.13.1-51.git4032bd5.fc28.x86_64
python3-docker-pycreds-0.2.2-2.fc28.noarch

Should this be documented somewhere? Or am I doing something wrong?

@TomasTomecek
Copy link
Member

This is a bug in a library colin is using which is already fixed in master branch: user-cont/conu#214. The problem is that the enum library is not provided for python3 because it's already part of the standard library. It is backported to python2 via the enum34 PyPI project.

We'll do a release to fix the bug, sorry for the trouble.

In the meantime you can install colin using python2:

$ pip2 install --user colin

@TomasTomecek TomasTomecek added the bug Something isn't working label May 23, 2018
@dharmit
Copy link
Author

dharmit commented May 24, 2018

Thank you Tomas! Just in case anyone else faces similar issue, I had to install libattr-devel RPM (dnf install -y libattr-devel) for the pip2 install command to work. It failed with below error otherwise:

Installing collected packages: atomicwrites, more-itertools, attrs, py, funcsigs, pluggy, pytest, docker-pycreds, docker, pyxattr, conu, dockerfile-parse, colin
  Found existing installation: docker-pycreds 0.2.1
    Uninstalling docker-pycreds-0.2.1:
      Successfully uninstalled docker-pycreds-0.2.1
  Running setup.py install for pyxattr ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-aC_Ujn/pyxattr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-1SN6zu-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'xattr' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -D_XATTR_VERSION="0.6.0" -D_XATTR_AUTHOR="Iustin Pop" -D_XATTR_EMAIL="iustin@k1024.org" -I/usr/include/python2.7 -c xattr.c -o build/temp.linux-x86_64-2.7/xattr.o -Wall -Werror -Wsign-compare
    xattr.c:29:10: fatal error: attr/xattr.h: No such file or directory
     #include <attr/xattr.h>
              ^~~~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-aC_Ujn/pyxattr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-1SN6zu-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-aC_Ujn/pyxattr/

@TomasTomecek
Copy link
Member

Is this still happening?

@dharmit dharmit closed this as completed Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants