Git选项卡完成时出错:“python:无法打开文件'manage.py':[Errno 2]”

时间:2013-08-22 05:58:20

标签: python git bash shell autocomplete

当我尝试选中完整的git命令时,我收到此python错误。有时,它仍将完成命令(但在3行Python错误之后),有时它会执行以下操作。 Git和bash-completion是最新版本。我正在运行Ubuntu 13.04。我怎样才能摆脱这个错误?

[~/code]$ git co[TAB]python: can't open file 'manage.py': [Errno 2] No such file or directory
python: can't open file 'manage.py': [Errno 2] No such file or directory
python: can't open file 'manage.py': [Errno 2] No such file or directory
^C

[~/code]$ sudo apt-get install bash-completion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
bash-completion is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

[~/code]$ sudo apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version.
git set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 个答案:

答案 0 :(得分:0)

manage.py来自Django,而不是git。听起来你已经安装了Django bash完成,但不是Django本身(或者它可能是你没有激活的虚拟版)。