Closed Catbohe closed 4 months ago
Hello @Catbohe Seems that the problem is related to try to install package that are only available for x86 arch, and not for arm64 arc.
I installed threeml
and HAL
in a Macbook pro with M3 chip and read the HAWC maptree using multiprocessing and did not find any errors.
As for now, astromodels
is not available for arm64 arch, and when trying to install using conda, the system will complaint that there is not match between the astromodels
and threeml
available versions. And trying to install using x86-specific packages do not help as they are optimized for another arch.
Please try the following to check if you can solve the problem:
conda create -y --name hal_env -c conda-forge numpy scipy matplotlib ipython "numba<0.57" reproject root python=3.10 "uproot<5.2" jupyter notebook
Please note that the python
version is fixed to 3.10. The same goes for uproot
(uproot<5.2
)
ebltable
, naima
, etc)python -m pip install git+https://github.com/threeml/astromodels
python -m pip install git+https://github.com/threeml/threeml
python -m pip install git+https://github.com/threeml/hawc_hal
Let me know if you find any other potential errors.
Hi
Hello @Catbohe Seems that the problem is related to try to install package that are only available for x86 arch, and not for arm64 arc.
I installed
threeml
andHAL
in a Macbook pro with M3 chip and read the HAWC maptree using multiprocessing and did not find any errors.As for now,
astromodels
is not available for arm64 arch, and when trying to install using conda, the system will complaint that there is not match between theastromodels
andthreeml
available versions. And trying to install using x86-specific packages do not help as they are optimized for another arch.Please try the following to check if you can solve the problem:
- Erase your current virtual environment
- Reinstall conda (miniconda) for arm64 arch
- Use the following instruction to create the virtual environment:
conda create -y --name hal_env -c conda-forge numpy scipy matplotlib ipython "numba<0.57" reproject root python=3.10 "uproot<5.2" jupyter notebook
Please note that the
python
version is fixed to 3.10. The same goes foruproot
(uproot<5.2
)
- Then, activate the virtual environment and install additional packages if needed (
ebltable
,naima
, etc)- Install HAL using pip:
python -m pip install git+https://github.com/threeml/astromodels python -m pip install git+https://github.com/threeml/threeml python -m pip install git+https://github.com/threeml/hawc_hal
Let me know if you find any other potential errors.
Hi,
Thanks for your reply. I followed your instructions but it still does not work.
Hi @Catbohe
Can you provide text file with the error?
BTW, I think the only thing I have different now, it is my configuration file where I set to use parallel
by default, but I remember to ran the example without that.
About the multiple init messages, that's the expected output, as the script is running in n
number of cores you specified to read the map tree.
Hello, I encountered a problem when I fit some HAWC private data on my laptop. I have successfully installed threeML and hawc_hal. When I did the fit using fitModel.py, It crashed at line 249 in from_root_file.py (https://github.com/threeML/hawc_hal/blob/cd2b4b5071c2e8e574c3938b942ade52ee364036/hawc_hal/maptree/from_root_file.py#L249). It seems that the problem is produced by the multiprocessing module. Also, It seems that that module starts more than one process("Srarting 3ML" occurred 3 times). If I run the same script on a HAWC server, it can work smoothly.
My laptop information: MacBook Pro Apple M2 Max macOS Ventura version 13.5 Xcode Version 15.0.1
miniconda https://repo.anaconda.com/miniconda/Miniconda3-py311_23.11.0-2-MacOS-x86_64.sh (I alse tried arm64, it also has the same problem )
I also set environment when installing threeML: export OMP_NUM_THREADS=1 export MKL_NUM_THREADS=1 export NUMEXPR_NUM_THREADS=1