实际上,pip会调用python3.6,这里缺少软链接,添加就行了
[root@dba bin]# pip -bash: /bin/pip: /usr/bin/python3.6: bad interpreter: No such file or directory
[root@dba bin]# ln -s /usr/local/python3Dir/bin/python3 python3.6 [root@dba bin]# ls -al pyth* lrwxrwxrwx. 1 root root 33 Nov 5 14:46 python -> /usr/local/python3Dir/bin/python3 lrwxrwxrwx. 1 root root 9 Oct 18 15:07 python2 -> python2.7 -rwxr-xr-x. 1 root root 7216 Aug 7 08:52 python2.7 -rwxr-xr-x. 1 root root 1835 Aug 7 08:51 python2.7-config lrwxrwxrwx. 1 root root 16 Oct 18 15:07 python2-config -> python2.7-config lrwxrwxrwx. 1 root root 33 Nov 7 11:33 python3.6 -> /usr/local/python3Dir/bin/python3 lrwxrwxrwx. 1 root root 7 Oct 18 15:07 python.bak -> python2 lrwxrwxrwx. 1 root root 14 Oct 18 15:07 python-config -> python2-config
[root@dba bin]# pip Usage: pip <command> [options] Commands: install Install packages.