2014-06-17 13:56:34 +0000 2014-06-17 13:56:34 +0000
61
61

python3-pip安装好了,但找不到pip3命令?

我正在几台电脑上测试一个Python3程序。为此,我需要用pip3安装一个Python的库。

于是,我首先在每台电脑上安装python3-pip(大家都是运行Kubuntu操作系统)。一切正常,然后我用pip3安装了我所需要的包,除了一台电脑,我都成功的安装了。

在那台电脑上,python3-pip显然是成功的安装了,但是当我查找包的时候,我得到了这样的错误(翻译是自制的):

Command «pip3» was not found, maybe you wanted to say:
 The command «pip» from the package «python-pip» (universe)
pip3: command not found

EDIT*

dpkg -L python3-pip的结果:

/.
/usr
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/pip-3.2.1.gz
/usr/share/doc
/usr/share/doc/python3-pip
/usr/share/doc/python3-pip/changelog.Debian.gz
/usr/share/doc/python3-pip/copyright
/usr/bin
/usr/bin/pip-3.2
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/pip
/usr/lib/python3/dist-packages/pip/log.py
/usr/lib/python3/dist-packages/pip/commands
/usr/lib/python3/dist-packages/pip/commands/unzip.py
/usr/lib/python3/dist-packages/pip/commands/zip.py
/usr/lib/python3/dist-packages/pip/commands/install.py
/usr/lib/python3/dist-packages/pip/commands/completion.py
/usr/lib/python3/dist-packages/pip/commands/uninstall.py
/usr/lib/python3/dist-packages/pip/commands/search.py
/usr/lib/python3/dist-packages/pip/commands/freeze.py
/usr/lib/python3/dist-packages/pip/commands/ __init__.py
/usr/lib/python3/dist-packages/pip/commands/help.py
/usr/lib/python3/dist-packages/pip/commands/bundle.py
/usr/lib/python3/dist-packages/pip/_pkgutil.py
/usr/lib/python3/dist-packages/pip/util.py
/usr/lib/python3/dist-packages/pip/status_codes.py
/usr/lib/python3/dist-packages/pip/vcs
/usr/lib/python3/dist-packages/pip/vcs/ __init__.py
/usr/lib/python3/dist-packages/pip/vcs/mercurial.py
/usr/lib/python3/dist-packages/pip/vcs/git.py
/usr/lib/python3/dist-packages/pip/vcs/bazaar.py
/usr/lib/python3/dist-packages/pip/vcs/subversion.py
/usr/lib/python3/dist-packages/pip/baseparser.py
/usr/lib/python3/dist-packages/pip/exceptions.py
/usr/lib/python3/dist-packages/pip/index.py
/usr/lib/python3/dist-packages/pip/basecommand.py
/usr/lib/python3/dist-packages/pip/req.py
/usr/lib/python3/dist-packages/pip/locations.py
/usr/lib/python3/dist-packages/pip/ __init__.py
/usr/lib/python3/dist-packages/pip/runner.py
/usr/lib/python3/dist-packages/pip/backwardcompat.py
/usr/lib/python3/dist-packages/pip/download.py
/usr/lib/python3/dist-packages/pip-1.1.egg-info
/usr/lib/python3/dist-packages/pip-1.1.egg-info/SOURCES.txt
/usr/lib/python3/dist-packages/pip-1.1.egg-info/not-zip-safe
/usr/lib/python3/dist-packages/pip-1.1.egg-info/top_level.txt
/usr/lib/python3/dist-packages/pip-1.1.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/pip-1.1.egg-info/entry_points.txt
/usr/lib/python3/dist-packages/pip-1.1.egg-info/dependency_links.txt

答案 (3)

83
83
83
2014-06-17 17:52:27 +0000

有三种方法可以解决:

1.如果python3-pip没有正确安装,请重新安装:

2.试着用python3-pip命令来代替(可以用;我没有在Kubuntu上试过。试着用pip --version命令来代替(在Fedora上有效,但我没有Kubuntu的拷贝来试试)。只是一个猜测…..检查一下python3-pip。有一点可能性是,在安装了pip之后,新的pip会_取代旧的alternatives(也许是通过dpkg -L python3-pip?)

编辑* 现在,pip-3.2的输出已经被添加到问题中,我可以提供答案。

5
5
5
2017-09-21 19:29:33 +0000

我遇到了这个问题,找到了解决办法。

执行python3-pip显示:

pip 1.1 from /usr/lib/python3/dist-packages (python 3.2)

pip-3.2显示:

&001

pip-3.2 --version,而

python3-pip给出的是command not found的信息。 https://sourceforge.net/projects/rpiqemuwindows/

我在安装pip-3.2之前检查了python3-pip,然后在安装之后检查了&007。

-3
-3
-3
2017-03-31 00:54:23 +0000

你可以使用 easy_install:

apt-get install python3-setuptools
easy_install3 pip