Closed floklimm closed 7 years ago
I get error for running 8 schools example by pystan. I used: Python 2.7.12 :: Anaconda custom (64-bit) Ubuntu 16.04 LTS
I have tried all the installation guidelines (pip, github,...), with python 2.7 and 3.5, executing from /home, /tmp/,... but I get the following error:
runfile('/tmp/eightschools.py', wdir='/tmp') INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_95013624776d537c3cd7cd4d641c30e0 NOW. Traceback (most recent call last):
File "", line 1, in runfile('/tmp/eightschools.py', wdir='/tmp')
File "/home/meysam/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile execfile(filename, namespace)
File "/home/meysam/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile builtins.execfile(filename, *where)
File "/tmp/eightschools.py", line 37, in iter=1000, chains=4)
File "/home/meysam/anaconda2/lib/python2.7/site-packages/pystan/api.py", line 368, in stan verbose=verbose)
File "/home/meysam/anaconda2/lib/python2.7/site-packages/pystan/model.py", line 315, in init self.module = load_module(module_name, lib_dir)
File "/home/meysam/anaconda2/lib/python2.7/site-packages/pystan/model.py", line 54, in load_module return imp.load_module(module_name, *module_info)
ImportError: /tmp/tmpLK2qQa/pystan/stanfit4anon_model_95013624776d537c3cd7cd4d641c30e0_724952c86beb130db392f6b01aa1ef05.so: undefined symbol: _ZNSt8ios_base7failureB5cxx11D1Ev
Interestingly, in Mac OS I don't get any error. Thanks a lot in advance for any help. Best, Meysam
I tried with Jupyter and get ImportError:
ImportError Traceback (most recent call last)
This seems likely to be related to the new Cython version used in the most recent version of Anaconda. Thanks for the report.
Fixed with the new Cython version.
Summary:
Running pystan in spyder leads to a Cython compiler crash.
Description:
Pystan initially runs fine in Spyder. However, if you run the same script a second time in the same console it leads to a Cython compiler crash. The error does not occur when just running two fits in the same script. So it seems to be a problem with executing the script a second time not the execution of pystan a second time per se.
Reproducible Steps:
Just running the '8 schools' example twice reproduces the error.
Current Output:
The error message is:
Expected Output:
It should just run again. My current workaround is to open a new console, which works but is a bit annoying.
PyStan Version: 2.12.0.0
Python Version: 2.7.12
Spyder Version: 2.3.8
Operating System: Ubuntu 16.04.1 LTS