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
相关推荐
aiguangyuan39 分钟前
使用LSTM进行情感分类:原理与实现剖析
人工智能·python·nlp
小小张说故事1 小时前
BeautifulSoup:Python网页解析的优雅利器
后端·爬虫·python
luoluoal1 小时前
基于python的医疗领域用户问答的意图识别算法研究(源码+文档)
python
Shi_haoliu1 小时前
python安装操作流程-FastAPI + PostgreSQL简单流程
python·postgresql·fastapi
ZH15455891311 小时前
Flutter for OpenHarmony Python学习助手实战:API接口开发的实现
python·学习·flutter
小宋10211 小时前
Java 项目结构 vs Python 项目结构:如何快速搭一个可跑项目
java·开发语言·python
一晌小贪欢2 小时前
Python 爬虫进阶:如何利用反射机制破解常见反爬策略
开发语言·爬虫·python·python爬虫·数据爬虫·爬虫python
躺平大鹅2 小时前
5个实用Python小脚本,新手也能轻松实现(附完整代码)
python
yukai080082 小时前
【最后203篇系列】039 JWT使用
python