如何修复通过 pip install 安装 pystan 时弹出的这个错误?

这是我在 Windows 命令提示符中输入的内容:


C:\Users\jeane\Desktop\ethan\stan> pip install pystan

这是我的输出:


Collecting pystan

Using cached https://files.pythonhosted.org/packages/6f/a1/fdf8906311733b7894aad1395d4d43afbbc79ca7573a07200eb105c5938c/pystan-2.18.0.0.tar.gz

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "C:\Users\jeane\AppData\Local\Temp\pip-install-wwq65uzi\pystan\setup.py", line 122, in <module>

    from Cython.Build.Inline import _get_build_extension

ModuleNotFoundError: No module named 'Cython'


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in 

C:\Users\jeane\AppData\Local\Temp\pip-install-wwq65uzi\pystan\

谢谢!


白衣非少年
浏览 1229回答 2
2回答

qq_笑_17

其实你可以尝试安装Anaconda。在谷歌搜索“Anaconda”,下载并安装它。然后,在你的Windows系统中搜索“Anaconda Prompt”并使用以下命令安装pystan:conda install pystan -c conda-forge之后,你应该看到这个:Solving environment: done## Package Plan ##&nbsp; environment location: C:\Users\User\Anaconda3&nbsp; added / updated specs:&nbsp; &nbsp; - pystanThe following packages will be downloaded:&nbsp; &nbsp; package&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; build&nbsp; &nbsp; ---------------------------|-----------------&nbsp; &nbsp; pystan-2.17.1.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp;py37h830ac7b_2&nbsp; &nbsp; &nbsp; &nbsp; 14.3 MB&nbsp; conda-forge&nbsp; &nbsp; openssl-1.0.2p&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp;hfa6e2cd_0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5.4 MB&nbsp; conda-forge&nbsp; &nbsp; conda-4.5.11&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; py37_1000&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;654 KB&nbsp; conda-forge&nbsp; &nbsp; ------------------------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Total:&nbsp; &nbsp; &nbsp; &nbsp; 20.3 MBThe following NEW packages will be INSTALLED:&nbsp; &nbsp; pystan:&nbsp; 2.17.1.0-py37h830ac7b_2 conda-forgeThe following packages will be UPDATED:&nbsp; &nbsp; conda:&nbsp; &nbsp;4.5.11-py37_0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--> 4.5.11-py37_1000&nbsp; conda-forge&nbsp; &nbsp; openssl: 1.0.2p-hfa6e2cd_0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--> 1.0.2p-hfa6e2cd_0 conda-forgeProceed ([y]/n)?只需按 y。Anaconda 将自动下载并安装它。

缥缈止盈

您是否尝试在那里安装它所说的内容?pip&nbsp;install&nbsp;Cython应该管用
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python