I can not use pymcwith psycopg2. The following is a simple passage from a tutorial:
import pymc as pm
with pm.Model() as model:
x = pm.Normal('x', mu=0., sd=1)
results in the following error:
Exception: the environment variable 'DYLD_FALLBACK_LIBRARY_PATH' does not contain the path '/ Users / josh / anaconda / envs / py27 / lib' in its value. This will cause Theano not to compile c-code. Update 'DYLD_FALLBACK_LIBRARY_PATH' to contain the specified value, this will fix this error.
I managed to fix this problem by adding:
export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/Users/josh/anaconda/envs/py27/lib
to my shell source file .bashrc. However , and this is the part that I do not understand, this line breaks psycopg2:
---> 50 from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
51
52 from psycopg2._psycopg import Binary, Date, Time, Timestamp
ImportError: dlopen(/Users/josh/anaconda/envs/py27/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: @loader_path/../../../libpq.5.dylib
Referenced from: /Users/josh/anaconda/envs/py27/lib/python2.7/site-packages/psycopg2/_psycopg.so
Reason: image not found
How can I psycopg2and pymc(here theano) live happily together?
OS X Python 2.7.6 Python, conda.