一些用 Python 2.7 编写的程序抱怨ImportError: No module named 'urlparse'. 所以我需要安装模块,但我无法做到。该模块确实存在,例如在https://docs.python.org/2/library/urlparse.html 中有描述。但是,既不能apt-get install,也pip install不能找到名为urlparse, python-urlparse, urllib, python-urllib...的模块——我收到类似Could not find any downloads that satisfy the requirement ...的消息 唯一的例外是python-urllib3可能包含所需文件但对于 Python 3 和安装没有帮助的包。
我已经安装了pip,不是pip3因为我需要 Python 2 ( pip 1.4.1 from /usr/lib/python2.7/dist-packages (python 2.7))的模块。我的 Ubuntu 是 Xubuntu 13.10。
请问哪里有问题?是否pip在正确的位置搜索模块?我不知道它应该在什么位置搜索...