Closed ChristopherAJDuncan closed 3 months ago
Under certain conditions (if I run setup.py explicitly) I get the following:
... Scanning dependencies of target ccllib_swig_compilation [ 93%] Swig compile ccl.i for python :3: Error: Unable to find 'python.swg ...
The quick solution, unless you absolutely need to use the system or macports python, is to use conda.
Check if you can import numpy in your python interpreters. cmake obtains include path using python -c "import numpy as n; print(n.__version__); print(n.get_include());"
, with python
replaced by the path to the python interpreter found previously.
Thanks @tilmantroester, I can install with Conda, but the script requires use of namaster (which is not currently hosted on Conda in arm form as far as I can tell, but also is another project I'm struggling to install anyway...) and glass (which is only hosted on PyPi). I'm not very familiar with Conda, and I think it can be set up to mix Conda forge with PyPi so I'm willing to try, but ideally could rely on PyPi entirely.
@hsinfan1996 thanks for the suggestion: the python interpreters can all see numpy. Even running your suggestion outputs:
1.26.3 /Users/Shared/env/py3.11/lib/python3.11/site-packages/numpy/core/include
as expected
Aha, I got it. I can install directly using python setup.py install
. There were only two issues:
Thanks to all who responded. One step forward...
I'd note that I still cannot install via PyPi, but at least I have a working version now :)
Hi there. New Mac (M3 chip) and doing a fresh install of everything. Unfortunately I'm falling over on getting pyccl to install. I've tried a few permutations, but with the same failures:
I've also tried in both cases installing in a venv. I've tried installing without numpy (and indeed it compiles numpy as part of the install), and with numpy explicitly installed.
The error message I get is as follows (following pip3 install pyccl):
I've also tried explicitly setting:
Any help greatly appreciated: I've exhausted my know-how unfortunately...