HOW TO INSTALL PYSPH ON MY WINDOWS 10

257 views
Skip to first unread message

Igor Tavares

unread,
Mar 1, 2023, 8:30:50 PM3/1/23
to pysph-users
Good evening everyone, my name is Igor Tavares and I am from Brazil, searching on Google I found this group of you and I think you can help me I have Windows 10 and I am not able to install PYSPH on my PC, I have already tried to follow the steps on the website: https://pysph.readthedocs.io/en/latest/ and nothing and I need to work with simulations, in the Master in Applied Informatics that I am doing here at UFRPE - Universidade Federal Rural de Pernambuco, but it is giving an error, who can help me to install PYSPH on my Windows 10 I thank you all in advance.

Yours sincerely,

Igor Tavares

Navaneet Villodi

unread,
Mar 4, 2023, 3:31:02 AM3/4/23
to pysph-users
Please try:
  1. Using latest MSVC.
  2. With Python 3.9

Having these, run:

python -m pip install numpy cython h5py
python -m pip install https://github.com/pypr/cyarray/zipball/master
python -m pip install https://github.com/pypr/compyle/zipball/master
git clone https://github.com/pypr/pysph.git
cd pysph
python -m pip install -r requirements.txt -r requirements-test.txt
python setup.py develop

I think this should work. If you are still unable to get it working, please provide more information about the error you get.

Cheers
Navaneet

wenwang liao

unread,
Oct 18, 2023, 11:32:44 PM10/18/23
to pysph-users
Hello developers, 
I use the Windows 11 system, and there is something wrong with the last step. Could you please help with this error?

the error:
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
Compiling pysph/base/particle_array.pyx because it changed.
Compiling pysph/base/point.pyx because it changed.
Compiling pysph/base/nnps_base.pyx because it changed.
Compiling pysph/base/spatial_hash_nnps.pyx because it changed.
Compiling pysph/base/z_order_nnps.pyx because it changed.
Compiling pysph/base/stratified_hash_nnps.pyx because it changed.
Compiling pysph/base/stratified_sfc_nnps.pyx because it changed.
Compiling pysph/base/octree.pyx because it changed.
Compiling pysph/base/octree_nnps.pyx because it changed.
Compiling pysph/tools/mesh_tools.pyx because it changed.
Compiling pysph/base/z_order_gpu_nnps.pyx because it changed.
Compiling pysph/base/stratified_sfc_gpu_nnps.pyx because it changed.
Compiling pysph/base/octree_gpu_nnps.pyx because it changed.
[ 1/13] Cythonizing pysph/base/nnps_base.pyx
warning: pysph\base\nnps_base.pxd:27:13: 'INT_MAX' redeclared
warning: pysph\base\nnps_base.pyx:34:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: pysph\base\nnps_base.pyx:51:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef set_number_of_threads(int n):
        print("OpenMP not available, cannot set number of threads.")


IF UNAME_SYSNAME == "Windows":
    cdef inline double fmin(double x, double y) nogil:
         ^
------------------------------------------------------------

pysph\base\nnps_base.pyx:52:9: Function signature does not match previous declaration

Error compiling Cython file:
------------------------------------------------------------
...


IF UNAME_SYSNAME == "Windows":
    cdef inline double fmin(double x, double y) nogil:
        return x if x < y else y
    cdef inline double fmax(double x, double y) nogil:
         ^
------------------------------------------------------------

pysph\base\nnps_base.pyx:54:9: Function signature does not match previous declaration
Traceback (most recent call last):
  File "E:\myenv\Scripts\pysph\setup.py", line 782, in <module>
    setup_package()
  File "E:\myenv\Scripts\pysph\setup.py", line 723, in setup_package
    ext_modules = cythonize(
  File "E:\myenv\lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "E:\myenv\lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: pysph/base/nnps_base.pyx

Regards,
Wenwang

Chaitanya Kesanapalli

unread,
Oct 19, 2023, 2:22:04 PM10/19/23
to pysph-users
I am also get the same error when I try installing in Windows 11. 

A Dinesh

unread,
Oct 20, 2023, 6:48:41 AM10/20/23
to Chaitanya Kesanapalli, pysph-users
Hi Wenwang,

Not quite an answer on how to install it on windows. But one recommended way is to install it on Linux subsystem. This way you can atleast get started with using PySPH.

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pysph-users/c9f82979-bca1-4370-8bd8-d7b666858304n%40googlegroups.com.

Chaitanya Kesanapalli

unread,
Oct 20, 2023, 10:32:21 AM10/20/23
to pysph-users
Hi Guys, 
I resolve this issue. 

The error is due to the cython version. For now, PySPH is working for version 0.29 but not 3.0. 

To install use the following commands. (Note this will install python 3.7 version)

conda create -n pysph -c conda-forge python numpy h5py cython==0.29 -y
conda activate pysph
pip install https://github.com/pypr/cyarray/zipball/master
pip install -r requirements.txt -r requirements-test.txt
python setup.py develop
To unsubscribe from this group and stop receiving emails from it, send an email to pysph-users...@googlegroups.com.

Jacob Karingottu

unread,
Apr 20, 2024, 1:44:28 PMApr 20
to pysph-users
Hi, my name is Jacob and am a new user of PySPH. I have installed PySPH. I had run the example elliptical_drop and tried to view its output using mayavi2 by using the following command in anaconda prompt: pysph view elliptical_drop_output. 
However, I am getting the following error message displayed:
     QObject::moveToThread: Current thread (0x16bf31cedc0) is not the object's thread. (0x16bf31cf8e0).
     Cannot ove to target thread (0x16bf31cedc0)
     qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
     This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
     Available platform plugins are: direct2d, minimal, offscreen, webgl, windows.

Please help me in resolving this issue. Thanks in advance.

Yours sincerely,
Jacob

Prabhu Ramachandran

unread,
Jun 20, 2024, 8:44:22 AMJun 20
to Jacob Karingottu, pysph-users
Hi,

This looks like a Qt installation issue, I am not sure. You can try with the latest PyQt5 version for example. A new Mayavi release was made a few weeks ago.

Another option is to dump the output to VTK files using `pysph dump_vtk` and visualize using any other tool like ParaView for example.

Regards,
Prabhu
Reply all
Reply to author
Forward
0 new messages