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
相关推荐
RabbitYao几秒前
Android 项目 通过 AndroidStringsTool 更新多语言词条
android·python
RabbitYao3 分钟前
使用 Gemini 及 Python 更新 Android 多语言 Excel 文件
android·python
天天进步20159 分钟前
Python机器学习入门:用scikit-learn构建你的第一个预测模型
python·机器学习·scikit-learn
程序员岳焱18 分钟前
使用 JPype 实现 Java 与 Python 的深度交互
java·后端·python
站大爷IP20 分钟前
Python处理JSON数据的最佳实践:从基础到进阶的实用指南
python
amazinging41 分钟前
北京-15k测试-入职甲方金融-上班第二天
python·金融
站大爷IP42 分钟前
Django中间件自定义开发指南:从原理到实战的深度解析
python
跟橙姐学代码1 小时前
Python 高手都偷偷用的 Lambda 函数,你还在傻傻写 def 吗?
前端·python
袁培宇1 小时前
python学习打卡day40
人工智能·python·学习
PythonicCC2 小时前
Django的生命周期
python·django·sqlite