簡體   English   中英

無法安裝 pystruct

[英]Cannot install pystruct

我正在嘗試在 Google colab 筆記本中安裝pystruct 我運行了命令!pip install pystruct但它給了我以下錯誤:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting pystruct
  Using cached pystruct-0.3.2.tar.gz (5.6 MB)
Requirement already satisfied: ad3 in /usr/local/lib/python3.7/dist-packages (from pystruct) (2.2.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from pystruct) (1.21.6)
Building wheels for collected packages: pystruct
  Building wheel for pystruct (setup.py) ... error
  ERROR: Failed building wheel for pystruct
  Running setup.py clean for pystruct
Failed to build pystruct
Installing collected packages: pystruct
    Running setup.py install for pystruct ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02lv77ji/pystruct_dc17de7a2ad6430496ef5c82985a0a60/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02lv77ji/pystruct_dc17de7a2ad6430496ef5c82985a0a60/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-tw042u_g/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/pystruct Check the logs for full command output.

有人可以幫我安裝它或為python中的CRF建議一個備用庫。

使用這些命令安裝 pystruct

git clone https://github.com/pystruct/pystruct && cd pystruct
curl https://patch-diff.githubusercontent.com/raw/pystruct/pystruct/pull/221.patch | git apply
pip install .

信用: https ://github.com/pystruct/pystruct/issues/237#issuecomment-661648379

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM