更新时间:2023-02-21 09:23:23
在Debian中,我在/usr/local/bin中找到了三个短文件:pip; pip3;和pip3.4.都一样:
In Debian, I found three short files in /usr/local/bin: pip; pip3; and pip3.4. All were identical:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
通过将pip3(使用sudo)的第一个shebang行更改为
By changing the very first shebang line of pip3 (with sudo) to
#!/usr/bin/python3
然后确保原始点是明确的
Then ensuring that the original pip was explicitly
#!/usr/bin/python2
我所有类似的困惑和错误都消失了.
All of my similar confusion and errors disappeared.