gpt4 book ai didi

python - 关于安装 Python 包的查询

转载 作者:太空狗 更新时间:2023-10-30 03:06:01 26 4
gpt4 key购买 nike

我在我的 Ubuntu 上安装了 ipython,然后我在上面安装了 mechanize。
我能做到

import mechanize

从命令提示符。但是当我说从 ipython 导入 Mechanize 时,它说没有名为 Mechanize 的模块。

最佳答案

我会这样做...

在控制台中:

>>> import mechanize
>>> mechanize.__file__
Some/path/to/mechanize

然后在 IPython 中,

[1] import sys
[2] print sys.path

查看/Some/path/to/mechanize 是否在您的 sys.path 中。

关于python - 关于安装 Python 包的查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9901111/

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