-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install on a mac? #104
Comments
Unfortunately, the current setup.py doesn't seem to handle this case well. I did get it to work on my Mac with the following changes (ideally these should be incorporated into setup.py at some point):
|
Thanks! Indeed it was also tricky for me to install it, and it would be great if this could be fixed in the next release! For the third fixing, I think using |
Ah -- good suggestion, thanks! Indeed, I'll try to have a look at it before the next release. |
Thanks! This worked for me, or at least, it got me through the installation step - I still have to try to use the code. I'll leave the issue open as a reminder to add this into setup.py for the next release. |
Unfortunately, now I have problems at import time:
which again looks like a boost-related problem. |
Indeed -- in my experience, this kind of error indicates some mismatch in the compilation of boost and that of |
I did some tests and found a solution. Compiling with g++ leads to the exact error, while compiling with clang++ is fine. Anaconda seems using g++ in default. So the solution is three steps:
Then Actually, another small issue occurs after that, which is reporting |
Wow, that's quite involved -- thanks for describing the process. I will add this info to the readme. I also get the |
This solution worked for me. I don't really understand it, as |
For anyone else looking to install this on mac using anaconda, we were able to get this installed without (directly) using # Install Python 3.7 and bdsf dependencies
conda create -n pybdsf_37_env 'python<3.8' astropy scipy matplotlib ipython boost -y
# Enter environment
conda activate pybdsf_37_env
# Specify clang compiler and install bdsf itself via pip
CXX=clang++ pip install bdsf
# Test
python -c 'import bdsf'; echo $? If $ python -c 'import bdsf'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~/repos/PyBDSF/bdsf/__init__.py", line 21, in <module>
from .collapse import Op_collapse
File "~/repos/PyBDSF/bdsf/collapse.py", line 11, in <module>
from . import _cbdsm
ImportError: cannot import name '_cbdsm' from 'bdsf' (~/repos/PyBDSF/bdsf/__init__.py) Though this doesn't appear to work on Python 3.8; we didn't test on any other versions. This is related to this issue: #170. |
I'm attempting to install pybdsf on a mac using anaconda. My attempts are stymied at this error:
my conda environment is:
most importantly:
Any ideas? Do I just need an older version of boost / py-boost / libboost ? Are there any reports of anyone successfully building pybdsf w/anaconda?
The text was updated successfully, but these errors were encountered: