【问题标题】:Is there a way of installing OptaPy in Kaggle?有没有办法在 Kaggle 中安装 OptaPy?
【发布时间】:2022-07-07 22:09:27
【问题描述】:

我想在 Kaggle 笔记本中试用 OptaPy,但在尝试安装时遇到了第一个障碍:

!pip install optapy
ERROR: Ignored the following versions that require a different python version: 8.11.0a0 Requires-Python >=3.9; 8.11.0a1 Requires-Python >=3.9; 8.11.0a2 Requires-Python >=3.9; 8.14.0a0 Requires-Python >=3.9; 8.16.1a0 Requires-Python >=3.9; 8.17.0a0 Requires-Python >=3.9; 8.19.0a0 Requires-Python >=3.9; 8.19.0a1 Requires-Python >=3.9; 8.21.0a0 Requires-Python >=3.9; 8.23.0a0 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement optapy (from versions: none)
ERROR: No matching distribution found for optapy

Kaggle 环境似乎是:Python 版本:3.7.12 | Java 版本:11.0.15

对解决方法有什么想法吗?

【问题讨论】:

    标签: kaggle optapy


    【解决方案1】:

    来自错误信息:

    ERROR: Ignored the following versions that require a different python version: 8.11.0a0 Requires-Python >=3.9; 8.11.0a1 Requires-Python >=3.9; 8.11.0a2 Requires-Python >=3.9; 8.14.0a0 Requires-Python >=3.9; 8.16.1a0 Requires-Python >=3.9; 8.17.0a0 Requires-Python >=3.9; 8.19.0a0 Requires-Python >=3.9; 8.19.0a1 Requires-Python >=3.9; 8.21.0a0 Requires-Python >=3.9; 8.23.0a0 Requires-Python >=3.9
    

    https://www.kaggle.com/general/173536 看来,Kaggle 使用的是 Python 3.7,并且没有提供直接的升级方式。 OptaPy 需要 Python 3.9 或更高版本(它在其源代码中使用 3.9 语法,因此 3.8 及更低版本将无法工作)。

    【讨论】: