gpt4 book ai didi

成功安装后在 Windows 10 Ubuntu 上运行的 Python3 中找不到 Python elasticsearch_dsl 模块

转载 作者:行者123 更新时间:2023-12-04 18:50:36 25 4
gpt4 key购买 nike

我在 Windows 10 Ubuntu 中成功安装了 elasticsearch_dsl 模块,但在 Python3 中找不到该模块。任何人都可以阐明问题可能是什么?

当我在 Anaconda 中运行时它运行良好,但是因为我的大部分代码都有 Unix 风格的文件路径,我真的希望它在 ubuntu 上运行。

$ pip install elasticsearch_dsl
Collecting elasticsearch_dsl
Using cached https://files.pythonhosted.org/packages/77/95/aa96ac42bf7cf8d56d4c7330f4fa5c1b2c460efa7ad2e9ba183bae823b0b/elasticsearch_dsl-7.0.0-py2.py3-none-any.whl
Collecting six (from elasticsearch_dsl)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3.3" (from elasticsearch_dsl)
Using cached https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting python-dateutil (from elasticsearch_dsl)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting elasticsearch<8.0.0,>=7.0.0 (from elasticsearch_dsl)
Using cached https://files.pythonhosted.org/packages/ae/43/38329621bcca6f0b97e1cc36fb3cef889414a1960fcdc83a41e26b496634/elasticsearch-7.0.2-py2.py3-none-any.whl
Collecting urllib3>=1.21.1 (from elasticsearch<8.0.0,>=7.0.0->elasticsearch_dsl)
Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Installing collected packages: six, ipaddress, python-dateutil, urllib3, elasticsearch, elasticsearch-dsl
Successfully installed elasticsearch-7.0.2 elasticsearch-dsl-7.0.0 ipaddress-1.0.22 python-dateutil-2.8.0 six-1.12.0 urllib3-1.25.3
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import elasticsearch_dsl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'elasticsearch_dsl'
>>>

预期结果是模块将被识别并正确导入。实际结果是 ModuleNotFoundError。谢谢你的帮助。

最佳答案

pip3 install elasticsearch_dsl 工作。显然,至少在这种情况下,python3 需要 pip3。

关于成功安装后在 Windows 10 Ubuntu 上运行的 Python3 中找不到 Python elasticsearch_dsl 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56814902/

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