Compiler error on initial install

50 views
Skip to first unread message

Casper Camenisch

unread,
Oct 30, 2024, 5:36:50 AM10/30/24
to pysph-users
Hi everyone,

I was unable to complete my installation of pysph due to a cython compile error.
I am running on Windows 11 and have the latest MSVC installed.
Here are the steps i took:

py -3.9 -m venv --system-site-packages SPHenv
.\SPHenv\Scripts\Activate.ps1
python -m pip install numpy cython h5py
cd pysph
python -m pip install -r requirements.txt -r requirements-test.txt
 python setup.py install

The compile error i get:
pysph\base\point.pyx:237:51: Invalid type.

Does anyone have an idea of how to resolve this?
Thank you in advance,
Casper

Navaneet Villodi

unread,
Oct 30, 2024, 7:24:25 AM10/30/24
to pysph-users
There are some fixes that are pending. Meanwhile, could you try this in a fresh python 3.11 venv:

pip install --upgrade pip setuptools wheel

pip install numpy cython h5py
pip install https://github.com/pypr/cyarray/zipball/master
pip install https://github.com/pypr/compyle/zipball/master
git fetch origin pull/400/head:interim
git switch interim
pip install -r requirements.txt -r requirements-test.txt
pip uninstall -y numpy
pip install oldest-supported-numpy
pip install -e . --no-build-isolation

I am not sure if it should be done like this, but this might get it going for you until the fixes are done, I guess.

Cheers
Navaneet

A Dinesh

unread,
Nov 6, 2024, 8:31:43 AM11/6/24
to Navaneet Villodi, pysph-users
Hi all,

These instructions are unfortunately failing for me. With some workaround I found a hack which I am sharing here for a successful installation

```bash
conda create -n pysph python=3.9
conda activate pysph

pip install 'cython<3'
pip install 'numpy==1.23'
pip install h5py
pip install https://github.com/pypr/pysph/zipball/master
```

Installation these old packages of `cython` and `numpy` certainly is not raising any issues while installing `PySPH`. Hope it will be helpful to someone who
quickly wants to run the software until it is fixed with the newer versions.

Regards
Dinesh



--
You received this message because you are subscribed to the Google Groups "pysph-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pysph-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pysph-users/cc60bc93-4102-4569-ac42-e2700d82d30dn%40googlegroups.com.

Casper Camenisch

unread,
Nov 6, 2024, 9:35:48 AM11/6/24
to pysph-users
Thank you Navaneet and Dinesh,

This method worked for me and with numpy 1.23 it is also compatible with matplotlib for visualization.

Cheers,
Casper
Reply all
Reply to author
Forward
0 new messages