PyStan import fail


#1

Operating System: Mac OS 10.13.3
Python Version: 3.6.4
Interface Version: 2.17.1 (installed via pip)
Compiler/Toolkit: clang (xcode command-line tools)

I must be doing something wrong, but I just installed pystan and an getting an error when attempting to import:

>>> import pystan
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mike/Downloads/rstan_vs_pystan/pystan.py", line 5, in <module>
    model = pystan.StanModel(file="model.stan")
AttributeError: module 'pystan' has no attribute 'StanModel'

Any idea what’s going awry?


#2

Nevermind! I had a file called pystan.py in the working directory; forgot that it’s a no-no to name files the same as packages you’ll be using.