Bayesium Analytics

Practical Bayesian Data Analysis

  • Archive
  • Backlog
  • Services

August 7, 2022 by kevin@ksvanhorn.com

Installing httpstan on Ubuntu Linux 20.04

The full instructions and source code are found here. In this post I’ll give the slimmed-down basics.

  1. If python3, pip, or curl are not already installed, install them:
    sudo apt install python3 python3-pip curl
  2. Now install via pip:
    python3 -m pip install httpstan
  3. Now do a quick check to verify the install:
    python3 -m httpstan &
    curl -H "Content-Type: application/json" --data \

    '{"program_code":"parameters {real y;} model {y ~ normal(0,1);}"}' \
    http://localhost:8080/v1/models > output.txt
  4. The file output.txt should contain the text representation of a JSON object with a “name” field, a “compiler_output” field that will be a long string, and a “stanc_warnings” field that should have the value “”.
  5. Now shut down the server:
    fg
    ^C

Filed Under: Uncategorized

Recent Posts

  • Installing httpstan on Ubuntu Linux 20.04
  • Installing CmdStan on Windows 10
  • Probability Theory Does Not Extend Logic?
  • It’s All About Jensen’s Inequality
  • Analysis of a Nootropics Survey

Archives

  • August 2022
  • July 2017
  • March 2016
  • August 2015
  • July 2015
  • June 2015

Categories

Tags

multilevel modeling nominal variables

Copyright © 2025 · Generate Pro Theme on Genesis Framework · WordPress · Log in