BUG:ERROR: Could not find a version that satisfies the requirement cython

BUG:ERROR: Could not find a version that satisfies the requirement cython

环境

python 复制代码
Python 3.10

详情

安装 pkuseg 分词库失败的错误。

错误提示

复制代码
ERROR: Could not find a version that satisfies the requirement cython (from versions: none)
`ERROR: No matching distribution found for cython`
distutils.errors.DistutilsError: Command '['/home/zmp/.conda/envs/keytechcpu/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpx394x6lt', '--quiet', '`cython`']' returned non-zero exit status 1.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

原因是安装cython依赖失败报错。

解决方法

可以手动安装

bash 复制代码
pip install cython

然后安装 pkuseg

bash 复制代码
pip install pkuseg==0.0.25
相关推荐
巴里巴气2 小时前
selenium基础知识 和 模拟登录selenium版本
爬虫·python·selenium·爬虫模拟登录
19892 小时前
【零基础学AI】第26讲:循环神经网络(RNN)与LSTM - 文本生成
人工智能·python·rnn·神经网络·机器学习·tensorflow·lstm
JavaEdge在掘金2 小时前
Redis 数据倾斜?别慌!从成因到解决方案,一文帮你搞定
python
ansurfen2 小时前
我的第一个AI项目:从零搭建RAG知识库的踩坑之旅
python·llm
前端付豪2 小时前
20、用 Python + API 打造终端天气预报工具(支持城市查询、天气图标、美化输出🧊
后端·python
前端付豪2 小时前
19、用 Python + OpenAI 构建一个命令行 AI 问答助手
后端·python
amazinging2 小时前
北京-4年功能测试2年空窗-报培训班学测开-第四十三天
python·学习
wgyang20163 小时前
我的第一个LangFlow工作流——复读机
python
Zhen (Evan) Wang3 小时前
(豆包)xgb.XGBRegressor 如何进行参数调优
开发语言·python
我爱一条柴ya3 小时前
【AI大模型】线性回归:经典算法的深度解析与实战指南
人工智能·python·算法·ai·ai编程