【问题标题】:Command "python setup.py egg_info" failed with error code 1 in c:\temp\pip-build-9s6c_h\pyenchant\命令“python setup.py egg_info”在 c:\temp\pip-build-9s6c_h\pyenchant\ 中失败,错误代码为 1
【发布时间】:2017-11-14 18:23:51
【问题描述】:

安装pyenchant时遇到问题:

Command "python setup.py egg_info" failed with error code 1 in c:\temp\pip-build-9s6c_h\pyenchant\

我尝试使用pip install --upgrade setuptools,但这根本没有帮助。

不知道该怎么办。

编辑:

附加回溯:

Collecting pyenchant
  Using cached pyenchant-1.6.11.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\temp\pip-build-farfu_\pyenchant\setup.py", line 212, in <module>
        import enchant
      File "enchant\__init__.py", line 92, in <module>
        from enchant import _enchant as _e
      File "enchant\_enchant.py", line 145, in <module>
        raise ImportError(msg)
    ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI.

【问题讨论】:

  • 堆栈跟踪中是否还有其他内容指向错误?
  • 在导入错误中添加了其他详细信息
  • 所以根据您的输出,您似乎没有安装enchant。如果你在 Linux 上运行,你会想要做一个 apt-get install enchant 或任何包被调用。我相信与使用 brew 的 Mac 相同。
  • 我用的是windows,pip好像不好用
  • 查看此页面和所有 cmets。据我所知,他们还没有为这个插件制作 pip wheel 包。 github.com/rfk/pyenchant/issues/42

标签: python pip installation pyenchant


【解决方案1】:

我认为您可以改用 whl 文件,例如:

pip install name.whl

我今天也遇到了这个问题。还好我用这个方法解决了。

pip install basemap-1.1.0-cp36-cp36m-win_amd64.whl

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-12-13
    • 2021-10-23
    • 2018-05-18
    • 2023-04-01
    • 2016-02-14
    • 2019-08-24
    • 1970-01-01
    相关资源
    最近更新 更多