Open arthurmloureiro opened 3 months ago
Since the error seems to come during the swig compilation, maybe it's an issue with the swig version?
Long-term we should just get rid of the C stuff or at least use something modern like pybind11.
I will check that and report here! On the MacOS, I have updated both swig and Cmake and still got it breaking
Maybe try downgrading swig and cmake. I know that at least for cmake some new versions are not fully backwards compatible.
Try removing the build
folder first and install pyccl again with python -m pip install pyccl
.
I also had pip issues installing CCL. Mine complained that CMake is not installed despite CMake having been installed via brew (I also tried the pip one) and the "cmake" command being there in the command line. I think I managed to get it installed using GitHub and installing manually with setup.py
I also had pip issues installing CCL. Mine complained that CMake is not installed despite CMake having been installed via brew (I also tried the pip one) and the "cmake" command being there in the command line. I think I managed to get it installed using GitHub and installing manually with setup.py
Can you elaborate on how you installed it manually with setup.py? I am facing the same issue.
In SOLikeT we have started having problems building pyccl too.
This appears only on Python 3.8 AND linux (not on other python version or on python 3.8 in macos).
From looking at where the error first appears:
-- Found PythonInterp: /usr/share/miniconda/envs/soliket-tests/bin/python3.8 (found suitable version "3.8.20", minimum required is "3.8.20")
-- Found PythonLibs: /usr/share/miniconda/envs/soliket-tests/lib/libpython3.8.so
CMake Warning (dev) at cmake/Modules/FindNumPy.cmake:45 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
pyccl/CMakeLists.txt:9 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /usr/share/miniconda/envs/soliket-tests/bin/python3.8 (found version "3.8.20")
CMake Error at cmake/Modules/FindNumPy.cmake:70 (list):
list GET given empty list
Call Stack (most recent call first):
pyccl/CMakeLists.txt:9 (find_package)
and the policy mentioned in the warning:
cmake --help-policy CMP0148
CMP0148
-------
.. versionadded:: 3.27
The ``FindPythonInterp`` and ``FindPythonLibs`` modules are removed.
These modules have been deprecated since CMake 3.12.
CMake 3.27 and above prefer to not provide the modules.
This policy provides compatibility for projects that have not been
ported away from them.
Projects using the ``FindPythonInterp`` and/or ``FindPythonLibs``
modules should be updated to use one of their replacements:
* ``FindPython3``
* ``FindPython2``
* ``FindPython``
The ``OLD`` behavior of this policy is for ``find_package(PythonInterp)``
and ``find_package(PythonLibs)`` to load the deprecated modules. The ``NEW``
behavior is for uses of the modules to fail as if they do not exist.
This policy was introduced in CMake version 3.27.
It may be set by ``cmake_policy()`` or ``cmake_minimum_required()``.
If it is not set, CMake warns, and uses ``OLD`` behavior.
.. note::
The ``OLD`` behavior of a policy is
``deprecated by definition``
and may be removed in a future version of CMake.
It seems as though updating this file might help? https://github.com/LSSTDESC/CCL/blob/a14a71727441aacd27b11eab20200e7b15d724f3/cmake/Modules/FindPythonLibsNew.cmake
I have never used cmake though so it may have nothing to do with it!
Okay!
I was able to fix this by making sure setuptools
and wheel
were explicitly installed in my env before I did pip install pyccl
.
I'm not sure I understand why your
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8", "cmake", "swig"]
in the pyproject.toml wasn't already enforcing this though?
Sorry, to be more specific, I was able to get it installed in an env which looks like this:
anyio 4.4.0 pyhd8ed1ab_0 conda-forge
appnope 0.1.4 pyhd8ed1ab_0 conda-forge
archspec 0.2.3 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py310h493c2e1_5 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
astropy 6.1.3 py310hae04be4_1 conda-forge
astropy-iers-data 0.2024.9.16.0.32.21 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 24.2.0 pyh71513ae_0 conda-forge
babel 2.14.0 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.3 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
boltons 24.0.0 pyhd8ed1ab_0 conda-forge
brotli 1.1.0 hb547adb_1 conda-forge
brotli-bin 1.1.0 hb547adb_1 conda-forge
brotli-python 1.1.0 py310h1253130_1 conda-forge
bzip2 1.0.8 h93a5062_5 conda-forge
c-ares 1.28.1 h93a5062_0 conda-forge
ca-certificates 2024.8.30 hf0a4a13_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cachetools 5.5.0 pyhd8ed1ab_0 conda-forge
certifi 2024.8.30 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py310hdcd7c05_0 conda-forge
chardet 5.2.0 py310hbe9552e_2 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.2.2 pyhd8ed1ab_0 conda-forge
conda 24.9.1 py310hbe9552e_0 conda-forge
conda-libmamba-solver 24.1.0 pyhd8ed1ab_0 conda-forge
conda-package-handling 2.2.0 pyh38be061_0 conda-forge
conda-package-streaming 0.9.0 pyhd8ed1ab_0 conda-forge
contourpy 1.3.0 py310h7306fd8_1 conda-forge
cycler 0.12.1 pyhd8ed1ab_0 conda-forge
debugpy 1.8.5 py310hb4ad77e_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
distlib 0.3.8 pyhd8ed1ab_0 conda-forge
distro 1.9.0 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.2.2 pyhd8ed1ab_0 conda-forge
executing 2.1.0 pyhd8ed1ab_0 conda-forge
filelock 3.16.0 pyhd8ed1ab_0 conda-forge
fmt 10.2.1 h2ffa867_0 conda-forge
fonttools 4.53.1 py310h493c2e1_1 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
freetype 2.12.1 hadb7bae_2 conda-forge
frozendict 2.4.4 py310ha6dd24b_0 conda-forge
gettext 0.22.5 h8414b35_3 conda-forge
gettext-tools 0.22.5 h8414b35_3 conda-forge
gh 2.55.0 h163aea0_0 conda-forge
h11 0.14.0 pyhd8ed1ab_0 conda-forge
h2 4.1.0 pyhd8ed1ab_0 conda-forge
hpack 4.0.0 pyh9f0ad1d_0 conda-forge
httpcore 1.0.5 pyhd8ed1ab_0 conda-forge
httpx 0.27.2 pyhd8ed1ab_0 conda-forge
hyperframe 6.0.1 pyhd8ed1ab_0 conda-forge
icu 73.2 hc8870d7_0 conda-forge
idna 3.6 pyhd8ed1ab_0 conda-forge
importlib-metadata 8.5.0 pyha770c72_0 conda-forge
importlib_metadata 8.5.0 hd8ed1ab_0 conda-forge
importlib_resources 6.4.5 pyhd8ed1ab_0 conda-forge
ipykernel 6.29.5 pyh57ce528_0 conda-forge
ipython 8.27.0 pyh707e725_0 conda-forge
ipywidgets 8.1.5 pyhd8ed1ab_0 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.4 pyhd8ed1ab_0 conda-forge
json5 0.9.25 pyhd8ed1ab_0 conda-forge
jsonpatch 1.33 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py310hbe9552e_3 conda-forge
jsonschema 4.23.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.12.1 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.23.0 hd8ed1ab_0 conda-forge
jupyter 1.1.1 pyhd8ed1ab_0 conda-forge
jupyter-lsp 2.2.5 pyhd8ed1ab_0 conda-forge
jupyter_client 8.6.2 pyhd8ed1ab_0 conda-forge
jupyter_console 6.6.3 pyhd8ed1ab_0 conda-forge
jupyter_core 5.7.2 py310hbe9552e_0 conda-forge
jupyter_events 0.10.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.14.2 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.5.3 pyhd8ed1ab_0 conda-forge
jupyterlab 4.2.5 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.27.3 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 3.0.13 pyhd8ed1ab_0 conda-forge
kiwisolver 1.4.7 py310h7306fd8_0 conda-forge
krb5 1.21.2 h92f50d5_0 conda-forge
lcms2 2.16 ha0e7c42_0 conda-forge
lerc 4.0.0 h9a09cb3_0 conda-forge
libarchive 3.7.2 hcacb583_1 conda-forge
libasprintf 0.22.5 h8414b35_3 conda-forge
libasprintf-devel 0.22.5 h8414b35_3 conda-forge
libblas 3.9.0 23_osxarm64_openblas conda-forge
libbrotlicommon 1.1.0 hb547adb_1 conda-forge
libbrotlidec 1.1.0 hb547adb_1 conda-forge
libbrotlienc 1.1.0 hb547adb_1 conda-forge
libcblas 3.9.0 23_osxarm64_openblas conda-forge
libcurl 8.7.1 h2d989ff_0 conda-forge
libcxx 18.1.8 h3ed4263_7 conda-forge
libdeflate 1.20 h93a5062_0 conda-forge
libedit 3.1.20191231 hc8eb9b7_2 conda-forge
libev 4.33 h93a5062_2 conda-forge
libffi 3.4.2 h3422bc3_5 conda-forge
libgettextpo 0.22.5 h8414b35_3 conda-forge
libgettextpo-devel 0.22.5 h8414b35_3 conda-forge
libgfortran 5.0.0 13_2_0_hd922786_3 conda-forge
libgfortran5 13.2.0 hf226fd6_3 conda-forge
libiconv 1.17 h0d3ecfb_2 conda-forge
libidn2 2.3.7 h93a5062_0 conda-forge
libintl 0.22.5 h8414b35_3 conda-forge
libintl-devel 0.22.5 h8414b35_3 conda-forge
libjpeg-turbo 3.0.0 hb547adb_1 conda-forge
liblapack 3.9.0 23_osxarm64_openblas conda-forge
libmamba 1.5.8 h90c426b_0 conda-forge
libmambapy 1.5.8 py310h5e0a2f6_0 conda-forge
libnghttp2 1.58.0 ha4dd798_1 conda-forge
libopenblas 0.3.27 openmp_h517c56d_1 conda-forge
libpng 1.6.43 h091b4b1_0 conda-forge
libsodium 1.0.18 h27ca646_1 conda-forge
libsolv 0.7.28 h1059232_2 conda-forge
libsqlite 3.45.2 h091b4b1_0 conda-forge
libssh2 1.11.0 h7a5bd25_0 conda-forge
libtiff 4.6.0 h07db509_3 conda-forge
libunistring 0.9.10 h3422bc3_0 conda-forge
libwebp-base 1.4.0 h93a5062_0 conda-forge
libxcb 1.15 hf346824_0 conda-forge
libxml2 2.12.6 h0d0cfa8_1 conda-forge
libzlib 1.2.13 h53f4e23_5 conda-forge
llvm-openmp 18.1.8 hde57baf_1 conda-forge
lz4-c 1.9.4 hb7217d7_0 conda-forge
lzo 2.10 h642e427_1000 conda-forge
mamba 1.5.8 py310ha5d4528_0 conda-forge
markupsafe 2.1.5 py310h493c2e1_1 conda-forge
matplotlib 3.9.2 py310hb6292c7_0 conda-forge
matplotlib-base 3.9.2 py310heb73f16_0 conda-forge
matplotlib-inline 0.1.7 pyhd8ed1ab_0 conda-forge
menuinst 2.0.2 py310hbe9552e_0 conda-forge
mistune 3.0.2 pyhd8ed1ab_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
nbclient 0.10.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.16.4 pyhd8ed1ab_1 conda-forge
nbformat 5.10.4 pyhd8ed1ab_0 conda-forge
ncurses 6.4.20240210 h078ce10_0 conda-forge
nest-asyncio 1.6.0 pyhd8ed1ab_0 conda-forge
notebook 7.2.2 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.4 pyhd8ed1ab_0 conda-forge
numpy 2.1.1 py310hcaf17df_0 conda-forge
openjpeg 2.5.2 h9f1df11_0 conda-forge
openssl 3.3.2 h8359307_0 conda-forge
overrides 7.7.0 pyhd8ed1ab_0 conda-forge
packaging 24.1 pyhd8ed1ab_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.4 pyhd8ed1ab_0 conda-forge
pexpect 4.9.0 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 10.3.0 py310h81a8c2e_0 conda-forge
pip 24.0 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.3.2 pyhd8ed1ab_0 conda-forge
pluggy 1.5.0 pyhd8ed1ab_0 conda-forge
prometheus_client 0.20.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.47 pyha770c72_0 conda-forge
prompt_toolkit 3.0.47 hd8ed1ab_0 conda-forge
psutil 6.0.0 py310h493c2e1_1 conda-forge
pthread-stubs 0.4 h27ca646_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.3 pyhd8ed1ab_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.6 py310h2aa6e3c_0 conda-forge
pycparser 2.22 pyhd8ed1ab_0 conda-forge
pyerfa 2.0.1.4 py310hae04be4_2 conda-forge
pygments 2.18.0 pyhd8ed1ab_0 conda-forge
pyobjc-core 10.3.1 py310hb3dec1a_1 conda-forge
pyobjc-framework-cocoa 10.3.1 py310hb3dec1a_1 conda-forge
pyparsing 3.1.4 pyhd8ed1ab_0 conda-forge
pyproject-api 1.7.1 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.10.14 h2469fbe_0_cpython conda-forge
python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.20.0 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.10 4_cp310 conda-forge
pytz 2024.2 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.2 py310h493c2e1_1 conda-forge
pyzmq 26.2.0 py310hcab215c_0 conda-forge
qhull 2020.2 h420ef59_5 conda-forge
readline 8.2 h92ec313_1 conda-forge
referencing 0.35.1 pyhd8ed1ab_0 conda-forge
reproc 14.2.4.post0 h93a5062_1 conda-forge
reproc-cpp 14.2.4.post0 h965bd2d_1 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.20.0 py310h7a930dc_1 conda-forge
ruamel.yaml 0.18.6 py310hd125d64_0 conda-forge
ruamel.yaml.clib 0.2.8 py310hd125d64_0 conda-forge
scipy 1.14.1 py310h35b72dc_0 conda-forge
send2trash 1.8.3 pyh31c8845_0 conda-forge
setuptools 69.5.1 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.1 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
terminado 0.18.1 pyh31c8845_0 conda-forge
tinycss2 1.3.0 pyhd8ed1ab_0 conda-forge
tk 8.6.13 h5083fa2_1 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.4.1 py310h493c2e1_1 conda-forge
tox 4.18.1 pyhd8ed1ab_0 conda-forge
tqdm 4.66.2 pyhd8ed1ab_0 conda-forge
traitlets 5.14.3 pyhd8ed1ab_0 conda-forge
truststore 0.8.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.9.0.20240906 pyhd8ed1ab_0 conda-forge
typing-extensions 4.12.2 hd8ed1ab_0 conda-forge
typing_extensions 4.12.2 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
unicodedata2 15.1.0 py310h2aa6e3c_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.2.1 pyhd8ed1ab_0 conda-forge
virtualenv 20.26.4 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.13 pyhd8ed1ab_0 conda-forge
webcolors 24.8.0 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.8.0 pyhd8ed1ab_0 conda-forge
wget 1.21.4 he2df1f1_0 conda-forge
wheel 0.43.0 pyhd8ed1ab_1 conda-forge
widgetsnbextension 4.0.13 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.11 hb547adb_0 conda-forge
xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge
xz 5.2.6 h57fd34a_0 conda-forge
yaml 0.2.5 h3422bc3_2 conda-forge
yaml-cpp 0.8.0 h13dd4ca_0 conda-forge
zeromq 4.3.5 hcc0f68c_4 conda-forge
zipp 3.20.2 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 h53f4e23_5 conda-forge
zstandard 0.22.0 py310h6289e41_0 conda-forge
zstd 1.5.5 h4f39d0f_0 conda-forge
On an arm64 macbook. Note the up to date versions of cmake and swig.
I had the installation failing before on the CMake Error at cmake/Modules/FindNumPy.cmake:70 (list)
I posted above in exactly the same env minus only setuptools and wheel.
Hi CCL Devs!
Unsure this is a known issue but the
python -m pip install pyccl
seems to be broken. I understand thatconda install pyccl
is a working alternative but this forces other packages dependent on ccl to also drop PyPI support.On MacOS we still have the issue reported here: #404 where CMake cannot be found when using pip.
On linux machines, the error is longer but still fails:
This is in a fresh new test environment.