2

我正在尝试在 Python 3.7 中使用 Jupyter notebook 安装索引器。

pip install indexer

我收到以下错误。

Collecting indexer
  Using cached https://files.pythonhosted.org/packages/c7/2f/49ea001ccc81502fe790c6077ca0cf9c4dc98ce160e1b1225a8c881b53b1/indexer-0.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\manorama\AppData\Local\Temp\pip-install-vs0071ok\indexer\setup.py", line 107
        except OSError, ex:
                      ^
    SyntaxError: invalid syntax

    ----------------------------------------
Note: you may need to restart the kernel to use updated packages.
Command "python setup.py egg_info" failed with error code 1 in C:\Users\manorama\AppData\Local\Temp\pip-install-vs0071ok\indexer\

我尝试了各种解决方案,例如

pip install --upgrade setuptools
pip install ez_setup

但没有任何工作。

如何安装索引器包?

4

3 回答 3

3

如果您使用的是“拼写检查器”库,请尝试使用“pip install pyspellchecker”进行安装。

于 2021-03-12T16:14:44.790 回答
2

似乎该indexer包与 Python 3 不兼容。在这种情况下,您有多种选择:

  • 寻找另一个提供类似功能的包。
  • 为您的应用程序使用 Python 2。
  • 提交错误报告并希望有人能解决问题,或者尝试自己修复包中的错误。
于 2019-08-22T07:21:44.460 回答
-2

好的,

  • 关闭 jupyter notebook 并“运行管理员 anaconda 终端”并重试

或者

  • pip3 安装索引器

或者

  • python3 -m pip 安装索引器
于 2019-08-22T06:38:48.957 回答