Skip to content

Commit dec9787

Browse files
authored
requirements for cython version (#322)
in environment yml files, and in installation documentation.
1 parent 3e8cbd5 commit dec9787

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

basic_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- defaults
44
dependencies:
55
- numpy
6-
- cython
6+
- cython ~= 0.29
77
- matplotlib
88
- scipy
99
- wrapt

docs/source/HPC_systems.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Let's start by loading the necessary modules and creating a conda environment. A
236236
conda create -n xpsi_py3 python=3.10.6
237237
conda activate xpsi_py3
238238
conda install -c conda-forge mpi4py
239-
conda install cython
239+
conda install cython ~= 0.29
240240
conda install scipy
241241
conda install matplotlib
242242
conda install wrapt
@@ -336,7 +336,7 @@ Then, create the conda environnnement and Install python packages with conda (or
336336
conda create -n xpsi --clone base
337337
conda activate xpsi
338338
conda install numpy scipy matplotlib wrapt
339-
conda install cython
339+
conda install cython ~= 0.29
340340
conda install h5py
341341
conda install -c conda-forge fgivenx
342342
pip install schwimmbad --user

docs/source/install.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,23 @@ contents are:
4444
- defaults
4545
dependencies:
4646
- numpy
47-
- cython
47+
- cython ~= 0.29
4848
- matplotlib
4949
- scipy
5050
- wrapt
5151
5252
5353
The core packages required for likelihood functionality are
5454
`numpy <https://docs.scipy.org/doc/numpy/index.html>`_,
55-
`cython <http://cython.readthedocs.io/en/latest>`_,
55+
`cython <http://cython.readthedocs.io/en/latest>`_ (< 1.0),
5656
`matplotlib <https://matplotlib.org/stable/index.html>`_,
5757
`scipy <https://docs.scipy.org/doc//scipy/index.html>`_, and
58-
`wrapt <https://wrapt.readthedocs.io/en/latest/>`_.
58+
`wrapt <https://wrapt.readthedocs.io/en/latest/>`_. The
59+
latest versions of ``cython (3.*)`` are not currently
60+
compatible with X-PSI (versions 1.* and 2.* of ``cython``
61+
were skipped). Therefore, it is important to install
62+
``cython ~= 0.29``, which will ensure that a compatible
63+
version is installed.
5964

6065

6166
To create a virtual environment from this file:
@@ -408,8 +413,8 @@ OS. Here we note some of the changes required.
408413
After creating the environment using the ``environment.yml`` file,
409414
install ``xcode`` or ``xcode tools``. Be mindful of the sequence of programs to
410415
be installed hereafter. Use ``pip install`` to download and install ``h5py``
411-
and ``emcee`` (and ``maplotlib``, ``numpy``, ``scipy`` and ``cython`` if not
412-
using the ``environment.yml``. You may use the file as a reference of the
416+
and ``emcee`` (and ``maplotlib``, ``numpy``, ``scipy`` and ``cython ~= 0.29``
417+
if not using the ``environment.yml``. You may use the file as a reference of the
413418
packages required).
414419

415420
On Mac OS, it's preferable to use ``llvm clang`` rather than ``gcc``. The

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- conda-forge
55
dependencies:
66
- numpy
7-
- cython
7+
- cython ~= 0.29
88
- matplotlib
99
- scipy
1010
- wrapt

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def EXTENSION(modname):
306306
'xpsi/utilities',
307307
'xpsi/pixelmesh'],
308308
install_requires = ['numpy'],
309-
setup_requires = ['cython'],
309+
setup_requires = ['cython ~= 0.29'],
310310
package_data = {'': ['README.rst', 'LICENSE']},
311311
include_package_data = True,
312312
ext_modules = extensions,

0 commit comments

Comments
 (0)