1

I am using Ubuntu "14.04.1", with python version 2.7.6

I have installed python-argcomplete package (version 0.6.9-1) but still getting an error while importing CompletionFinder from argComplete.

This is import line in my code:

from argcomplete import CompletionFinder

While compiling this file I get this error:

ImportError: cannot import name CompletionFinder

Any suggestion?

4
  • Have you tried importing argcomplete and then using CompletionFinder as argcomplete.CompletionFinder. Try and see if you get error – Mostafa Ahangarha Mar 18 '16 at 6:31
  • yes i did. but i am getting error in import statement itself, which is: "rom argcomplete import CompletionFinder" – user3105199 Mar 18 '16 at 7:06
  • What is the error in this case? you can also check if this package is installed or not on your device using this command: pip list | grep argcomplete – Mostafa Ahangarha Mar 18 '16 at 7:12
  • package is installed on the system. i also mentioned the version in my previous post. here is the output of pip command: pip list | grep argcomplete argcomplete (0.6.9) – user3105199 Mar 18 '16 at 9:16
3

Version 0.6.9 in the Ubuntu 14.04 repositories doesn't have the CompletionFinder class, it was introduced in version 0.8.0 according to GitHub.

CompletionFinder is almost identical to the autocomplete function, so you might get away with just using that.

Another solution might be to uninstall the package and get the latest version from PyPI with the following command:

sudo pip install argcomplete
1
  • version 0.8.0 of argcomplete is not available yet. i updated my python version from 2.7 to Python3 and it fixed the issue. Thanks for directing. – user3105199 Mar 21 '16 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.