使用CircleCI时的Pyenchant导入错误

问题描述

我正在开发一个小型python应用程序,并试图建立CircleCI管道。但是,在运行管道时,尝试安装依赖项时出现错误。我对CircleCI还是相当陌生,因此将不胜感激。

CircleCI管道输出:

#!/bin/bash -eo pipefail
if true; then
  pip install --user -r requirements.txt
else
  pip install -r requirements.txt
fi

Collecting appdirs==1.4.3
  Downloading appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Collecting packaging==16.8
  Downloading packaging-16.8-py2.py3-none-any.whl (23 kB)
Collecting pyenchant==1.6.8
  Downloading pyenchant-1.6.8.tar.gz (63 kB)
     |████████████████████████████████| 63 kB 6.4 MB/s  eta 0:00:01
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ldce2ddj/pyenchant/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ldce2ddj/pyenchant/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-u00xtveu
         cwd: /tmp/pip-install-ldce2ddj/pyenchant/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "/tmp/pip-install-ldce2ddj/pyenchant/setup.py",line 210,in <module>
        import enchant
      File "/tmp/pip-install-ldce2ddj/pyenchant/enchant/__init__.py",line 92,in <module>
        from enchant import _enchant as _e
      File "/tmp/pip-install-ldce2ddj/pyenchant/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.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


Exited with code exit status 1
CircleCI received exit code 1

配置文件:

version: 2.1

orbs:
  python: circleci/python@0.2.1

jobs:
  build-and-test:
    executor: python/default
    steps:
      - checkout
      - python/load-cache
      - python/install-deps
      - python/save-cache
      - run:
          command: ./manage.py test
          name: Test

workflows:
  main:
    jobs:
      - build-and-test

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...