【问题标题】:Can't pip install pystan无法 pip 安装 pystan
【发布时间】:2021-09-30 14:45:17
【问题描述】:

不能pip install fbprophet也不能pip install pystan

我在 Windows 10 上使用 VS Code 和 Python 3.9.3 64 位。我还更新到最新版本的 Visual Studio 构建工具 (16.11.3),因为有人说,你至少需要 Visual Studio C++ 14.0 用于使用pystan

Collecting pystan
  Using cached pystan-3.2.0-py3-none-any.whl (13 kB)
Collecting clikit<0.7,>=0.6
  Using cached clikit-0.6.2-py2.py3-none-any.whl (91 kB)
Collecting aiohttp<4.0,>=3.6
  Using cached aiohttp-3.7.4.post0-cp39-cp39-win_amd64.whl (634 kB)
Collecting pysimdjson<4.0,>=3.2
  Using cached pysimdjson-3.2.0-cp39-cp39-win_amd64.whl (157 kB)
ERROR: Could not find a version that satisfies the requirement httpstan<4.6,>=4.5 (from pystan) (from versions: 0.2.5, 0.3.0, 0.3.1, 0.4.0, 0.5.0, 0.6.0, 0.7.2, 0.7.3, 0.7.5, 0.7.6, 0.8.0, 0.9.0, 0.10.1)
ERROR: No matching distribution found for httpstan<4.6,>=4.5 (from pystan)

还尝试安装 httpstan 不起作用,并且还给了我更多错误。 我见过有人使用 conda/anaconda,但我不使用它。 任何帮助表示赞赏。

【问题讨论】:

  • DeepSpace 的回答中提到的问题的解决方法可能是使用 CmdStanPy。它至少是一个 Python 接口,可以与最新版本的 Stan 一起使用。

标签: python installation pip pystan


【解决方案1】:

问题在于安装httpstan。您使用的是 Windows,但根据其pypi page,它仅支持 Linux 和 MacOS。 list of wheels 证实了这一点。

您可以通过使用 VM 或 docker 绕过此问题,这两者都超出了此问题的范围,因此请尝试对其进行研究。

【讨论】: