{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/pystan/issues/269","repository_url":"https://api.github.com/repos/stan-dev/pystan","labels_url":"https://api.github.com/repos/stan-dev/pystan/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/pystan/issues/269/comments","events_url":"https://api.github.com/repos/stan-dev/pystan/issues/269/events","html_url":"https://github.com/stan-dev/pystan/issues/269","id":188219166,"number":269,"title":"ImportError when compiling model on Ubuntu with Anaconda","user":{"login":"jonasbusk","id":657503,"avatar_url":"https://avatars.githubusercontent.com/u/657503?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasbusk","html_url":"https://github.com/jonasbusk","followers_url":"https://api.github.com/users/jonasbusk/followers","following_url":"https://api.github.com/users/jonasbusk/following{/other_user}","gists_url":"https://api.github.com/users/jonasbusk/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasbusk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasbusk/subscriptions","organizations_url":"https://api.github.com/users/jonasbusk/orgs","repos_url":"https://api.github.com/users/jonasbusk/repos","events_url":"https://api.github.com/users/jonasbusk/events{/privacy}","received_events_url":"https://api.github.com/users/jonasbusk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-11-09T10:59:01Z","updated_at":"2016-11-16T22:38:51Z","closed_at":null,"body":"#### Summary:\r\n\r\nStan fails with an ImportError when compiling the C++ code for a model on Ubuntu with Anaconda.\r\n\r\n\r\n#### Description:\r\n\r\nI've pip installed pystan and can import pystan in Python without errors. But when compiling a Stan model (for example the [eight schools example](http://pystan.readthedocs.io/en/latest/getting_started.html#example-1-eight-schools)), I get an ImportError. \r\n\r\nUsing pystan on my Mac with Anaconda in a similar way works fine. \r\n\r\n#### Reproducible Steps:\r\n\r\n1. `$ conda create -n pystan`\r\n2. `$ source activate pystan`\r\n3. `$ pip install pystan`\r\n4. `$ python eight_schools.py`\r\n\r\n#### Current Output:\r\n\r\n```\r\nINFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_95013624776d537c3cd7cd4d641c30e0 NOW.\r\nTraceback (most recent call last):\r\n  File \"eight_schools.py\", line 30, in <module>\r\n    iter=1000, chains=4)\r\n  File \"/home/jonas/.conda/envs/pystan/lib/python2.7/site-packages/pystan/api.py\", line 372, in stan\r\n    verbose=verbose)\r\n  File \"/home/jonas/.conda/envs/pystan/lib/python2.7/site-packages/pystan/model.py\", line 316, in __init__\r\n    self.module = load_module(self.module_name, lib_dir)\r\n  File \"/home/jonas/.conda/envs/pystan/lib/python2.7/site-packages/pystan/model.py\", line 55, in load_module\r\n    return imp.load_module(module_name, *module_info)\r\nImportError: /tmp/tmpLiJgvA/stanfit4anon_model_95013624776d537c3cd7cd4d641c30e0_5096100179209156203.so: undefined symbol: _ZTVNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE\r\n```\r\n\r\n#### Expected Output:\r\n\r\nNo errors.\r\n\r\n#### PyStan Version:\r\n\r\n'2.12.0.0'\r\n\r\n#### Python Version:\r\n\r\nPython 2.7.12 :: Anaconda 4.2.0 (64-bit)\r\n\r\n#### Operating System:\r\n\r\nUbuntu 16.04 LTS"},"comment":{"url":"https://api.github.com/repos/stan-dev/pystan/issues/comments/261095634","html_url":"https://github.com/stan-dev/pystan/issues/269#issuecomment-261095634","issue_url":"https://api.github.com/repos/stan-dev/pystan/issues/269","id":261095634,"user":{"login":"ariddell","id":19950,"avatar_url":"https://avatars.githubusercontent.com/u/19950?v=3","gravatar_id":"","url":"https://api.github.com/users/ariddell","html_url":"https://github.com/ariddell","followers_url":"https://api.github.com/users/ariddell/followers","following_url":"https://api.github.com/users/ariddell/following{/other_user}","gists_url":"https://api.github.com/users/ariddell/gists{/gist_id}","starred_url":"https://api.github.com/users/ariddell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariddell/subscriptions","organizations_url":"https://api.github.com/users/ariddell/orgs","repos_url":"https://api.github.com/users/ariddell/repos","events_url":"https://api.github.com/users/ariddell/events{/privacy}","received_events_url":"https://api.github.com/users/ariddell/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T22:38:51Z","updated_at":"2016-11-16T22:38:51Z","body":"Looks like it might be related to #271 although I don't know how. I created a new issue #272 on the off chance that this is some unrelated problem."}}
{"actor":{"display_login":"ariddell"}}