It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
6年前关闭。
我知道这可能有点重复,但是不同之处在于我已经安装了httplib2,请看:
也许它不在正确的目录中?
这是我的回溯:
通常,您可以假定是否有任何名为
6年前关闭。
我知道这可能有点重复,但是不同之处在于我已经安装了httplib2,请看:
D4zk1tty@kali:~$ sudo apt-get install python-httplib2
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-httplib2 is already the newest version.
python-httplib2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded
也许它不在正确的目录中?
这是我的回溯:
Traceback (most recent call last):
File "test.py", line 9, in <module>
import httplib2
ImportError: No module named httplib2
最佳答案
在Ubuntu中,python2 / python3模块分为单独的软件包。因此,要在httplib2
中安装python3
,正确的命令是
$ sudo apt-get install python3-httplib2
通常,您可以假定是否有任何名为
python-???
的软件包,您也有python3-???
(python-django
是一个示例,其中没有可用的python3软件包)。关于python - ImportError:没有名为httplib2的模块,但已安装httplib2 ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17116290/
10-12 21:57