hddm-devs / hddm

HDDM is a python module that implements Hierarchical Bayesian parameter estimation of Drift Diffusion Models (via PyMC).
http://ski.clps.brown.edu/hddm_docs/
Other
263 stars 119 forks source link

Installation Problem for Mac with Python 3.7 #51

Open vkadambi opened 5 years ago

vkadambi commented 5 years ago

I am having trouble installing hddm for my mac. I tried both the pip and conda install methods. I also have successfully installed all the dependencies (pymc3, pandas, kabuki, cython).

My error for the conda install method was that: Solving environment: failed with current_repodata.json, will retry with next repodata source.

My error for the pip install method was:

warning "Using deprecated NumPy API, disable it with " \

 ^
src/wfpt.cpp:629:10: fatal error: 'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1

Running setup.py install for HDDM ... error ERROR: Command errored out with exit status 1: command: /Users/vyshukadambi/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-req-build-9l012xfs/setup.py'"'"'; file='"'"'/private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-req-build-9l012xfs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-record-u4yj9cx8/install-record.txt --single-version-externally-managed --compile cwd: /private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-req-build-9l012xfs/ Complete output (59 lines): running install running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.7 creating build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/MPLTraits_qt.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/generate.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/init.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/utils.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/diag.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/MPLTraits.py -> build/lib.macosx-10.7-x86_64-3.7/hddm copying hddm/likelihoods.py -> build/lib.macosx-10.7-x86_64-3.7/hddm creating build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/benchmark.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/init.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/test_generate.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/matlab_values.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/test_likelihoods.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/test_models.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests copying hddm/tests/test_optimization.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/tests creating build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/rl.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_regression.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_rl.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/init.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_info.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_stimcoding.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_truncated.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/hddm_transformed.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models copying hddm/models/base.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/models creating build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/simple_model.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/plot_posterior_quantiles.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/init.py -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/simple_subjs_difficulty.csv -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/simple_subjs_difficulty_single.csv -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/cavanagh_theta_nn.csv -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/rlddm_data.csv -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/simple_difficulty.csv -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples copying hddm/examples/simple_difficulty.conf -> build/lib.macosx-10.7-x86_64-3.7/hddm/examples running build_ext building 'wfpt' extension creating build/temp.macosx-10.7-x86_64-3.7 creating build/temp.macosx-10.7-x86_64-3.7/src gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/openssl/1.0.2t/include -I/Users/vyshukadambi/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/vyshukadambi/anaconda3/include/python3.7m -c src/wfpt.cpp -o build/temp.macosx-10.7-x86_64-3.7/src/wfpt.o warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] In file included from src/wfpt.cpp:626: In file included from /Users/vyshukadambi/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /Users/vyshukadambi/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /Users/vyshukadambi/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1824: /Users/vyshukadambi/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it with " \

^ src/wfpt.cpp:629:10: fatal error: 'algorithm' file not found

include

^~~ 2 warnings and 1 error generated. error: command 'gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /Users/vyshukadambi/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-req-build-9l012xfs/setup.py'"'"'; file='"'"'/private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-req-build-9l012xfs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/q6/0f7npjx55x1452w50jc1f0th0000gn/T/pip-record-u4yj9cx8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

courtneygoodridge commented 5 years ago

I have had this same error message on my windows computer. Using the Anaconda prompt command for both pip and conda installation, I haven't been able to download. If anyone has any thoughts I'd be most appreciative.

esintu commented 4 years ago

I get the same error (src/wfpt.cpp:629:10: fatal error: 'algorithm' file not found) in python 3.6 and Mac 10.14, after following the steps in this post and adding a Cython install through pip before kabuki and hddm installations.

akjagadish commented 4 years ago

I get this bug on my mac even after following the steps from here: https://gist.github.com/birkin/3b17a11ccbfa512a59565296ce4c7ff4

`Traceback (most recent call last):

File "/Users/akshay/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3267, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in import hddm

File "/Users/akshay/DAinPFC/tools/hddm/hddm/init.py", line 7, in from . import likelihoods

File "/Users/akshay/DAinPFC/tools/hddm/hddm/likelihoods.py", line 2, in import pymc as pm

File "/Users/akshay/anaconda3/lib/python3.7/site-packages/pymc/init.py", line 19, in from .threadpool import *

File "/Users/akshay/anaconda3/lib/python3.7/site-packages/pymc/threadpool.py", line 346 def await(self): ^ SyntaxError: invalid syntax`

boegel commented 4 years ago

@akjagadish see https://github.com/pymc-devs/pymc/issues/188