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
相关推荐
醇氧几秒前
uvicorn 详细介绍
linux·运维·python·python3.11
丹宇码农20 分钟前
Go 与 Python 协程(Coroutine)对比演示项目
开发语言·python·golang
codists39 分钟前
lexeme和token
python
天赐范式1 小时前
天赐范式第182天:让变异开始存活——主线重启与变异存续条件
python·ar模型·数字生命·天赐范式·动态运行时·稳态方差·变异存续
lusklusklusk1 小时前
Python 四大数据结构详解:元组、列表、集合、字典的特点与增删改查
数据结构·windows·python
打工仔折腾 AI1 小时前
把模型切换交给平台:用蓝耘智能路由搭建商品评论分析工具
java·服务器·前端·后端·python·性能优化·ai agent 实战
ynchyong1 小时前
python list 地常用操作
开发语言·python
梦在远山后2 小时前
PostgreSQL 锁与死锁:结合 DevMind 讲清楚
python·postgresql·agent
郝学胜_神的一滴2 小时前
AI 编程智能体 01:普通程序员的下一个逆天改命风口
人工智能·python
zh路西法2 小时前
【ResNet18】从图像到视觉特征:卷积神经网络如何理解图像
pytorch·python·神经网络·cnn·resnet·resnet18