pip依赖满足失败:ipykernel非连续版本范围配置异常排查
安装Python项目时ipykernel版本范围配置导致依赖解析失败
项目配置情况
项目包含要求setuptools>=45的pyproject.toml文件,setup.cfg中的install_requires配置如下:
install_requires = nexusformat >= 0.7.5 numpy scipy h5py >= 2.9 qtpy qtconsole ipython ipykernel <= 6.8.0, >= 6.15.2
执行安装命令后的错误
执行pip install -e .时触发以下错误:
$ pip install -e . Obtaining file:///Users/rosborn/Documents/Computing/Repositories/nexpy Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... done Requirement already satisfied: matplotlib in /Users/rosborn/opt/miniconda3/envs/py38/lib/python3.8/site-packages (from NeXpy==0.14.6.dev6+g9996d70.d20220829) (3.6.0rc1) ERROR: Could not find a version that satisfies the requirement ipykernel<=6.8.0,>=6.15.2 (from nexpy) (from versions: 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.2, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 4.5.0, 4.5.1, 4.5.2, 4.6.0, 4.6.1, 4.7.0, 4.8.0, 4.8.1, 4.8.2, 4.9.0, 4.10.0, 4.10.1, 5.0.0b1, 5.0.0, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.1.4, 5.2.0, 5.2.1, 5.3.0, 5.3.1, 5.3.2, 5.3.3, 5.3.4, 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.5.0, 5.5.3, 5.5.4, 5.5.5, 5.5.6, 6.0.0a0, 6.0.0a1, 6.0.0a2, 6.0.0a3, 6.0.0a4, 6.0.0a5, 6.0.0a6, 6.0.0b0, 6.0.0rc0, 6.0.0rc1, 6.0.0rc2, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0, 6.2.0, 6.3.0, 6.3.1, 6.4.0, 6.4.1, 6.4.2, 6.5.0, 6.5.1, 6.6.0, 6.6.1, 6.7.0, 6.8.0, 6.9.0, 6.9.1, 6.9.2, 6.10.0, 6.11.0, 6.12.0, 6.12.1, 6.13.0, 6.13.1, 6.14.0, 6.15.0, 6.15.1, 6.15.2) ERROR: No matching distribution found for ipykernel<=6.8.0,>=6.15.2
疑问与环境说明
即使已安装ipykernel v6.8.0或v6.15.2,该错误仍会触发。已查阅类似问题但未找到匹配情况,想确认是否是非连续版本范围的设置问题或存在语法错误。当前环境为setuptools v65.3.0、pip 22.2.2、Python 3.8。
内容的提问来源于stack exchange,提问作者Ray Osborn
相关产品推荐
相关产品推荐

