0

当我尝试使用 tab 完成 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.
4

1 回答 1

0

manage.py来自 Django,而不是 git。听起来您已经安装了 Django bash 补全,但没有安装 Django 本身(或者它可能在您尚未激活的 virtualenv 中)。

于 2013-08-22T05:59:42.887 回答