gpt4 book ai didi

python - 无法导入确定安装的模块

转载 作者:IT老高 更新时间:2023-10-28 21:06:58 25 4
gpt4 key购买 nike

安装后mechanize ,我好像无法导入。

我已尝试从 pip、easy_install 以及通过此 repo 中的 python setup.py install 进行安装:https://github.com/abielr/mechanize .所有这些都无济于事,因为每次我进入我的 Python 交互我都会得到:

Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mechanize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mechanize
>>>

我之前运行的安装报告它们已成功完成,因此我希望导入能够正常工作。什么可能导致此错误?

最佳答案

就我而言,这是权限问题。该软件包以某种方式仅以root rw权限安装,其他用户无法对其进行rw!

关于python - 无法导入确定安装的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14295680/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com