Closed kayhan-batmanghelich closed 8 years ago
Hey Kayhan!
Setting a shell alias won't affect how the 'gcc' name gets resolved when python setup.py
calls it, and so it's likely that when you run the setup.py file it's still using clang to compile (hence the error message about clang).
You could either set the CC
environment variable or you could create a symbolic link in the filesystem somewhere on your PATH
. If you're using bash or zsh, to set the environment variables you can do something like
CC=$(which gcc-5) CXX=$(which g++-5) pip install -e .
assuming that which gcc-5
correctly resolves to the homebrew gcc binary you want to use.
Does that work? Or at least change the error message?
Hi Matt,
I think I resolved this issue so this issue is resolved. I thought you may want to add this to your readme file just in case someone else run into the same issue:
brew reinstall gcc --without-multilib
brew install gsl
export CC='gcc-5'
export CXX='g++-5'
you may also want to add the following depenencies to the readme file:
conda install --channel https://conda.anaconda.org/Chroxvi brewer2mpl
pip install git+https://github.com/mattjj/pyhsmm-autoregressive.git
pip install git+https://github.com/HIPS/hips-lib
Thanks, Kayhan
ref: http://stackoverflow.com/questions/5967065/python-distutils-not-using-correct-version-of-gcc
Oop, Matt. Sorry I post it and then read your post. Thank you for your reply.
Glad to hear it's resolved! We'll try to make the readme clearer, and also root out any dependencies missing from the install_requires
list in setup.py.
Hi Scott,
Thank you for sharing your code. I have some issues with installation on Mac and Linux (not the focus of this post). Here is what I get when I want to install it:
It seems that issue is with the compiler. Following this post: http://stackoverflow.com/questions/29057437/compile-openmp-programs-with-gcc-compiler-on-os-x-yosemite
I gcc without
--without-multilib
:but I still get the same error. It seems that the package still tries to use
clang
(not sure?). Do you have any idea how to solve this issue?Thanks, Kayhan
another relevant post in stackoverflow: http://stackoverflow.com/questions/36908426/compile-an-openmp-program-with-cmake-on-os-x