Last active
May 26, 2018 10:47
-
-
Save vhsu/bb5405d2643820371df17a7e02c21f45 to your computer and use it in GitHub Desktop.
Pystan Windows Reinstall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 . Open CMD.exe as ADMIN | |
2. Install Chocolatery : @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
https://chocolatey.org/install | |
3. Update Python : choco install python --pre | |
https://chocolatey.org/packages/python | |
4. Install Anaconda : https://www.anaconda.com/download/ | |
5 . Open Anaconda Prompt and install Pystan : | |
- conda install numpy | |
- conda install cython | |
6. Install Pystan in Anaconda Prompt : pip install pystan | |
6. bis d'ont forget to install mingw and add it to the path : mingw.org | |
7. test if pystan was correctly installed (run in anaconda prompt or jupiter) | |
import pystan | |
model_code = 'parameters {real y;} model {y ~ normal(0,1);}' | |
model = pystan.StanModel(model_code=model_code) | |
y = model.sampling(n_jobs=1).extract()['y'] | |
y.mean() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment