Open Jean1995 opened 3 years ago
Does compiling proposal with the conda compiler work?
This also might be a reason to do a conda forge package.
@pascalgutjahr and I tried using the conda compiler by using conda install -c conda-forge compilers
without success.
Looking at the pybind11 issue there seems to be a lively discussion on the problem now, but I did not find the time to work through all the ideas that were brought up. But it looks like the problem is also connected to conan and the way pybind11 is packaged there.
So for now, the easiest solution is probably to try installing PROPOSAL without conan, i.e. installing all dependencies manually.
The installation still does not work with conda, but it works in a virtual environment for both OS X 11.6 and 10.15.7. For the installation you can use the way via conan
. I have done it in the following way:
conda deactivate
python3 - m venv proposal_env
export PYTHONPATH=/Users/pgutjahr/Documents/PROPOSAL/build/package/lib:$PYTHONPATH
It's import to add the path of the PROPOSAL library to the PYTHONPATH, otherwise python can not find the module.
Since I usually activate the conda environment in my .bash_profile
, I added the deactivation of conda and the export of the PYTHONPATH to the activation script of my virtual environment. So you just have to source
the virtual environment and you are able to run PROPOSAL.
As the problem is still not fixed, the simplest workaround to install proposal via pip is still:
conda deactivate #in case you are still in your conda base environment
python3 - m venv proposal_env
pip install proposal
There is an issue on MacOS machines using anaconda when trying to import proposal in Python.
The installation (either using pip or manually) is working fine, however,
import proposal
leads to the erroror
Apparently, this is an issue with pybind11 (see here or here or here). The discussions say that this might have to do with conda python and the python package being built with different Clang versions. However, the issue does not seem to be resolved, and I couldn't find any viable solutions for this issue yet.
There is a github actions run where the issue has been reproduced, although I am not entirely sure whether this is the same problem (see here)