0

这是我在 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\

谢谢!

4

2 回答 2

5

其实你可以尝试安装 Anaconda。在谷歌搜索“Anaconda”,下载并安装它。之后,在你的 Windows 系统中搜索“Anaconda Prompt”并使用以下命令安装 pystan:

conda install pystan -c conda-forge

之后,您应该会看到:

Solving environment: done

## Package Plan ##

  environment location: C:\Users\User\Anaconda3

  added / updated specs:
    - pystan


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pystan-2.17.1.0            |   py37h830ac7b_2        14.3 MB  conda-forge
    openssl-1.0.2p             |       hfa6e2cd_0         5.4 MB  conda-forge
    conda-4.5.11               |        py37_1000         654 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        20.3 MB

The following NEW packages will be INSTALLED:

    pystan:  2.17.1.0-py37h830ac7b_2 conda-forge

The following packages will be UPDATED:

    conda:   4.5.11-py37_0                       --> 4.5.11-py37_1000  conda-forge
    openssl: 1.0.2p-hfa6e2cd_0                   --> 1.0.2p-hfa6e2cd_0 conda-forge

Proceed ([y]/n)?

只需按 y。Anaconda 将自动下载并安装它。

于 2018-10-26T11:03:20.050 回答
0

您是否尝试安装那里所说的内容?

pip install Cython 

应该管用

于 2018-10-24T00:37:01.737 回答