简体   繁体   中英

How can I fix this error that pops up when installing pystan via pip install?

This is what I typed into my Windows Command Prompt:

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

This was my output:

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\

Thank you!

Actually you can try installing Anaconda.Search google for "Anaconda",download it and install it.After that,search "Anaconda Prompt" in your Windows system and install pystan with this command:

conda install pystan -c conda-forge

After that,you should see this:

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)?

Simply press y.Anaconda will automatically download and install it.

Did you try to install what it says there?

pip install Cython 

should work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM