Broken package click

Asked by Tuomas Lähteenmäki on 2015-04-27

 click (0.4.38.5-0~457~ubuntu14.04.1) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 31, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package click (--remove):

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu click Edit question
Assignee:
No assignee Edit question
Solved by:
Mike Carifio
Solved:
2016-08-11
Last query:
2016-08-11
Last reply:
2015-04-28
Mike Carifio (carifio) said : #1

Similar problem:

# click hook run-system
Traceback (most recent call last):
  File "/usr/bin/click", line 31, in <module>
    from click import commands
ImportError: cannot import name 'commands'

Best Mike Carifio (carifio) said : #2

For me there was a spurious package click in /usr/local/lib/python3.4/dist-packages/click, which I removed. Then click works:

# click help
build
buildsource
chroot
contents
framework
hook
info
install
list
pkgdir
register
unregister
verify
Usage: click COMMAND [options]

Commands are as follows ('click COMMAND --help' for more):

  build Build a Click package.
  buildsource Build a Click source package.
  chroot Use and manage a Click chroot.
  contents Show the file-list contents of a Click package file.
  framework List available frameworks.
  hook Install or remove a Click system hook.
  info Show manifest information for a Click package.
  install Install a Click package (low-level; consider pkcon instead).
  list List installed Click packages.
  pkgdir Print the directory where a Click package is unpacked.
  register Register an installed Click package for a user.
  unregister Unregister an installed Click package for a user.
  verify Verify a Click package.

Options:
  -h, --help show this help message and exit

Tuomas Lähteenmäki (lahtis) said : #3

Thanks Mike Carifio, that solved my question.