docker-archive / dockercloud-cli

CLI for Docker Cloud
https://cloud.docker.com/
Apache License 2.0
74 stars 40 forks source link

Unusable on Manjaro/Arch linux #42

Open devops1337 opened 7 years ago

devops1337 commented 7 years ago

Gives back following error when invoking either docker-cloud or sudo docker-cloud. Manjaro linux latest updates installed.

Traceback (most recent call last):
  File "/usr/bin/docker-cloud", line 11, in <module>
    load_entry_point('docker-cloud==1.0.7', 'console_scripts', 'docker-cloud')()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.5/site-packages/dockercloudcli/cli.py", line 10, in <module>
    from dockercloudcli import commands
  File "/usr/lib/python3.5/site-packages/dockercloudcli/commands.py", line 15, in <module>
    from dockercloudcli import utils
  File "/usr/lib/python3.5/site-packages/dockercloudcli/utils.py", line 16, in <module>
    from exceptions import BadParameter, StreamOutputError
ImportError: No module named 'exceptions'
gegenschall commented 7 years ago

I came across the same issue. docker-cloud doesn't work with Python 3.x. So, under Arch install use python2. The following should achieve this:

$ cat /etc/issue
Arch Linux \r (\l)

# Install pip for Python2.7, will pull in Python2.7 if you haven't installed that
$ sudo pacman -S python2-pip

# Install docker-cloud to .local/lib/python2.7/site-packages. Use a virtualenv or whatever, YMMV.
$ pip2 install --user docker-cloud

# Maybe do this in your .zshrc/.bashrc
$ export PATH=$PATH:~/.local/bin

$ docker-cloud --version
docker-cloud 1.0.7
rndmh3ro commented 7 years ago

For this reason I created an AUR package: https://aur.archlinux.org/packages/docker-cloud/

loki666 commented 7 years ago

your AUR packages fails to install on my box some files conflicts with python2-dockercloud files

rndmh3ro commented 7 years ago

@loki666, this is a problem with the libraries, not the AUR package. It should be fixed when the PR https://github.com/docker/python-dockercloud/pull/30 is merged and a new version is pushed to pypi.