安装 hunspell 包

2024-02-17

我期待使用 pip 安装 hunspell 包,但它会抛出以下错误:

Collecting hunspell
  Using cached hunspell-0.4.1.tar.gz
Building wheels for collected packages: hunspell
  Running setup.py bdist_wheel for hunspell ... error
  Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmphqvqt4lxpip-wheel- --python-tag cp34:
  /root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_ext
  building 'hunspell' extension
  creating build
  creating build/temp.linux-x86_64-3.4
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
  hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
   #include <hunspell.h>
                        ^
  compilation terminée.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for hunspell
  Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
  Running setup.py install for hunspell ... error
    Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-euhsmasb-record/install-record.txt --single-version-externally-managed --compile:
    /root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
      warnings.warn(msg)
    running install
    running build
    running build_ext
    building 'hunspell' extension
    creating build
    creating build/temp.linux-x86_64-3.4
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
    hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
     #include <hunspell.h>
                          ^
    compilation terminée.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-euhsmasb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-oyfpp3iy/hunspell/
[root@localhost Bureau]# alias python-devel=python34-devel
[root@localhost Bureau]# pip install hunspell
Collecting hunspell
  Using cached hunspell-0.4.1.tar.gz
Building wheels for collected packages: hunspell
  Running setup.py bdist_wheel for hunspell ... error
  Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmptwg_9c8vpip-wheel- --python-tag cp34:
  /root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_ext
  building 'hunspell' extension
  creating build
  creating build/temp.linux-x86_64-3.4
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
  hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
   #include <hunspell.h>
                        ^
  compilation terminée.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for hunspell
  Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
  Running setup.py install for hunspell ... error
    Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-zrlp2go9-record/install-record.txt --single-version-externally-managed --compile:
    /root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
      warnings.warn(msg)
    running install
    running build
    running build_ext
    building 'hunspell' extension
    creating build
    creating build/temp.linux-x86_64-3.4
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
    hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
     #include <hunspell.h>
                          ^
    compilation terminée.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-zrlp2go9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xpljhkom/hunspell/

我听说安装 python3-dev 可以解决这个问题。 我尝试过但没有成功。 我在 CentOS 7 下使用 python 3.4。 我可以寻求帮助吗?提前致谢。


我刚刚在 Centos7 64 位上使用 python3.4 和 pip3.4 完成了这个过程。 (注意你需要 python3.4 和 pip3.4)

我最终通过 pip3.4 让它工作,但在这工作之前,我必须采取一些额外的步骤。我采取的步骤是:

安装python3.4开发头文件:

sudo yum install python34u-devel.x86_64

安装 hunspell 和 hunspell-devel (hunspell.h 和 hunspell lib 需要):

sudo yum install hunspell hunspell-devel

在 /usr/lib64/ 中,为 hunspell 库添加额外的符号链接:

sudo ln -s libhunspell-1.3.so libhunspell.so

最后,运行命令:

sudo pip3.4 install hunspell

...这给了我以下输出:

... (compiler output deleted) ...
Successfully built hunspell
Installing collected packages: hunspell
Successfully installed hunspell-0.4.1
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

安装 hunspell 包 的相关文章

随机推荐

  • Sinatra/Rack 的一个非常简单的身份验证方案是什么

    我正忙于将一个非常小的 Web 应用程序从 ASP NET MVC 2 移植到 Ruby Sinatra 在 MVC 应用程序中 当根据数据库正确验证用户登录时 FormsAuthentication SetAuthCookie 用于设置持
  • 如何使用接口实现松耦合?

    我似乎不明白接口如何实现松耦合的概念 您可能会发现这个问题与其他问题重复 但我已经阅读了许多与该主题相关的答案 但没有找到令人满意的解释 下面是许多开发人员实现松散耦合的示例 interface shape public function
  • 如何禁用 Django allauth 中的中间注销页面

    How to disable the intermediate signout page from django allauth When the user clicks on the signout link on my site I w
  • 使用“copy”属性来维护不可变的 NSString

    我对 iOS 开发和 Objective C 编程非常陌生 我一直在应用程序开发库上做练习 这是我正在尝试理解的当前练习 3 测试如果您将可变字符串设置为该人的名字 然后在调用修改后的 sayHello 方法之前更改该字符串 会发生什么情况
  • SwiftUI 中联系人应用程序中的联系人列表

    您好 我正在尝试构建一个列出所有联系人的界面 就像Contacts and Phone应用程序具有相同的UI 到目前为止我所尝试的如下 基本上我尝试实施CNContactPickerViewController from ContactsU
  • 如何向 THREE.BufferGeometry 添加面?

    我以编程方式创建了一个简单的网格 var CreateSimpleMesh new function var xy maxX 7 maxY 10 river 0 5 0 4 1 3 2 2 3 2 4 1 5 1 6 0 grassGeom
  • 如何将当前git分支的名称放入shell脚本中的变量中? [复制]

    这个问题在这里已经有答案了 我是 shell 脚本新手 无法弄清楚这一点 如果您不熟悉 命令 gitbranch 返回类似的内容 develop master 其中星号标记当前签出的分支 当我在终端中运行以下命令时 git branch g
  • JavaFX 树视图不显示任何项目

    我尝试在我的 JavaFX 应用程序中实现 TreeView 但不幸的是没有显示任何项目 但我找不到问题 我搜索了一些例子并像他们一样做了 我将 TreeView 控件放入 SceneBuilder 中的 FXML 文件中 并选择生成的 C
  • Java:将(长)对象转换为双精度的多种方法

    我有一个Object obj我知道实际上是一个long 在一些数学代码中我需要它作为double 直接将其转换为双倍安全吗 double x double obj 或者我应该先将其转换为 long 然后再转换为 double double
  • 具有多行的 NSTextFieldCell

    我需要显示一个包含多行且每行格式不同的 NSTextFieldCell 像这样的事情 Line 1 Title2号线 描述 我对 NSTextFieldCell 进行了子类化 但我不知道如何继续使用它 有任何想法吗 首先 你不have子类化
  • 将连接限制为一行

    我有以下查询 SELECT sum select count as itemCount SalesOrderItems price as amount rma as creditType Clients company as client
  • C在short和int之间转换的规则是什么?

    当使用 C 在 Short 和 int 之间进行转换时 我感到很困惑 我假设short是16位 int是32位 我用下面的代码进行了测试 unsigned short a 0xFFFF signed short b 0xFFFF unsig
  • 在 Win32 C++ 中创建 GUI

    我正在开发我的第一个 Windows 桌面应用程序 并且正在尝试找出创建该程序的 GUI 的最佳方法 我知道 我知道 考虑到有关该主题的数据量 我觉得问这个问题很愚蠢 然而 大多数答案似乎已经过时 我不确定它们是否适合我的特定项目 另外 W
  • 什么是测试中的软件故障? [关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 我正在上软件测试的研究生课程 我们花了一整堂课来讨论故障 错误和故障之间的区别 我对测试中软件故障的定义不满意 你的定义是什么 您可能对此感兴趣
  • 何时使用 Vanilla JavaScript 与 jQuery?

    我注意到 在监视 尝试回答常见 jQuery 问题时 有一些使用 javascript 而不是 jQuery 的做法 实际上使您能够少写多做 同样的数量 并且还可能产生性能优势 一个具体的例子 this vs this 在引用被单击对象 i
  • Visual C++ 似乎对类的 POD 成员进行了零初始化,但它不应该这样做

    我有一堂这样的课 class TestClass public TestClass Note I wish not to initialize rawMemory for whatever reason int rawMemory 32 i
  • x86 上 Java 侵入性最小的编译屏障

    如果我有一个 Java 进程通过共享 ByteBuffer 或类似的方式与其他进程交互 那么 C C 中的编译器屏障的侵入性最小的等效项是什么 不需要可移植性 我对 x86 特别感兴趣 例如 我有 2 个进程根据伪代码读取和写入内存区域 p
  • 在 C# 中替换字符串中的所有特殊字符

    我想找到字符串中的所有特殊字符并用连字符 我正在使用下面的代码 string content foo bar regular expression replace 123 string pattern a zA Z regex patter
  • 将 PHP 字符串剪短

    你会如何把字符串剪短 这样它就不会进入 div 标签中的下一行例如我的message字符串包含以下内容 我们更喜欢可以回答的问题 而不仅仅是讨论 提供详细信息 写得清楚 简单 如果您的问题与此网站有关 请在元上提问 我想最好将其显示为 我们
  • 安装 hunspell 包

    我期待使用 pip 安装 hunspell 包 但它会抛出以下错误 Collecting hunspell Using cached hunspell 0 4 1 tar gz Building wheels for collected p