Installing PySPH on Linux

445 views
Skip to first unread message

Stephan

unread,
May 31, 2021, 11:01:02 AM5/31/21
to pysph-users
Dear developers and/or users,

Could someone help me with getting PySPH working on Linux? I've tried installing it using the instructions on the pysph.readthedocs.io page in the Linux instructions as well as the Anaconda instructions. As I read the Anaconda way of installing the software should be easy but I still get a load of errors related to package issues while I just used the exact same approach as was used in the docs. I would really like some comments on the procedure as it is presented on the readthedocs because I suppose they are not up to date.

Kind regards,

Stephan

Stephan

unread,
May 31, 2021, 3:25:42 PM5/31/21
to pysph-users
More specifically, I think it is required to know which versions of all the dependencies are to be used. When I'm using the most up-to-date version of Anaconda and simply run conda install -c conda-forge cython mako matplotlib jupyter pyside pytest mock I get a lot of conflicting packages errors.

Op maandag 31 mei 2021 om 17:01:02 UTC+2 schreef Stephan:

A Dinesh

unread,
May 31, 2021, 7:51:11 PM5/31/21
to Stephan, pysph-users
Hi Stephan.

Please try this.

Stet creating a virtual environment, change the directory to Pysph and run,

'pip install -r requirements.txt'

and get back to us.

--
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 on the web visit https://groups.google.com/d/msgid/pysph-users/abc1947c-b088-427c-8760-3f73a0f75da0n%40googlegroups.com.

Stephan

unread,
Jun 1, 2021, 11:32:09 AM6/1/21
to pysph-users
Dear A. Dinesh,

Thank you very much for your quick reply. I tried the following procedure:

cd pysph
python3 -m venv pysph_env
source /pysph_env/bin/activate
pip install wheel
pip install r requirements.txt
pip install r requirements-test.txt
python setup.py install
pysph test -v

The test now didn't give any failures anymore, so that seemed to work now. (567 passed, 296 skipped, 6xfailed, 8 warnings).

pysph run elliptical_drop

Was running and produced output. For viewing I performed the following procedure:

pip install vtk
pip install mayavi
pysph view elliptical_drop_output/

This results in a RuntimeError: No traits.toolkits plugin could be loaded for qt4. Maybe you can advise me on this and on my overall approach. Did I miss out on something?

Kind regards,

Stephan



Op dinsdag 1 juni 2021 om 01:51:11 UTC+2 schreef adepu.d...@gmail.com:

A Dinesh

unread,
Jun 1, 2021, 12:36:59 PM6/1/21
to Stephan, ABHINAV MUTA, pysph-users
Yesss. So Pysph is installed now. Don't worry about the tests, now you have working installation. 

I am not so sure about installing Mayavi the correct way. @ABHINAV MUTA  any help here?

Prabhu Ramachandran

unread,
Jun 1, 2021, 12:45:01 PM6/1/21
to Stephan, pysph-users
On 6/1/21 22:06, A Dinesh wrote:
Yesss. So Pysph is installed now. Don't worry about the tests, now you have working installation. 

I am not so sure about installing Mayavi the correct way. @ABHINAV MUTA  any help here?

You should install pyqt5 or pyside2.

pip install pyqt5

or

pip install pyside2

Then try to run pysph view again and let us know if it does not work.

cheers,
Prabhu

Stephan

unread,
Jun 1, 2021, 12:56:28 PM6/1/21
to pysph-users
Dear Prabhu,

This worked! Thank you so much for your support!

Best,

Stephan

Op dinsdag 1 juni 2021 om 18:45:01 UTC+2 schreef Prabhu Ramachandran:
Message has been deleted

Stephan

unread,
Sep 2, 2021, 11:57:28 AM9/2/21
to pysph-users
Although this trick worked for completing the installation, I now ran into a new error message:

pysph view elliptical_drop_output/
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Hopefully, someone can help me out here :)




Op donderdag 2 september 2021 om 17:45:35 UTC+2 schreef Stephan:
Dear all,

I have a note for the people that try the same installation procedure as I described here. The above procedure worked fine at the time of writing, but now I wanted to install PySPH and Mayavi on a new workstation and during installation of Mayavi the installer was hanging. The quick solution for this is to use:

pip install vtk==9.0.1

Best,

Stephan

Op dinsdag 1 juni 2021 om 18:56:28 UTC+2 schreef Stephan:

mutaa...@gmail.com

unread,
Sep 3, 2021, 2:31:51 AM9/3/21
to pysph-users
Hi Stephan,

The installation seem fine to me when I did it my machine with ubuntu 16.04 and python3.9. I was also able to view using the pysph viewer while on the same machine. 

When I was connecting remotely to this ubuntu machine by doing ssh -X name@ip from my mac I was getting the same error as above. The error goes away if do ssh -Y name@ip. But, another error shows up:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
2021-09-03 11:47:02.323 (   5.050s) [        31707700]vtkOpenGLRenderWindow.c:569    ERR| vtkXOpenGLRenderWindow (0x55c49429bd00): GLEW could not be initialized: Missing GL version

I am not sure how to solve this error. Hope this helps.

Cheers,
Abhinav
Message has been deleted

Stephan

unread,
Sep 3, 2021, 5:23:34 AM9/3/21
to pysph-users
Dear Abhinav,

I don't know how to solve the issue you are facing. Luckily, after some trial and error I found a way to solve my issue:

sudo apt install libxcb-xinerama0

When I was installing Mayavi on my previous workstation I didn't encounter this problem. Actually, I have no clue why this issue occurred and why installing libxcb-xinerama0 solved the issue, but it works.

Best,

Stephan

Op donderdag 2 september 2021 om 17:57:28 UTC+2 schreef Stephan:

Stephan

unread,
Sep 3, 2021, 9:40:10 AM9/3/21
to pysph-users
Dear Abhinav,

I thought with installing the libxcb-xinerama0 it worked, but apparently it worked only once. That means, after installing libxcb-xinerama0 and running pysph view elliptical_drop_output/ the Mayavi GUI was opened with the results but when closing the GUI and running pysph view elliptical_drop_output/ again it was hanging and I couldn't even abort with ctrl + c. This is a very strange issue if you ask me.

My setup:
Python 3.8.10
Ubuntu 20.04.3
PyQt5 5.15.4
vtk 9.0.3

Now with vtk 9.0.1 installed it seems to be working again. Hopefully this is the permanent fix.

Best,

Stephan

Op vrijdag 3 september 2021 om 11:23:34 UTC+2 schreef Stephan:

siddharth...@gmail.com

unread,
Oct 14, 2021, 2:30:04 AM10/14/21
to pysph-users
Dear Users,

Regarding the installation of PySPH, I had to reinstall because I lost some of the data. When I trying to install again with the dependencies, I am getting an error while installing the compyle module. I am installing on my windows system but through the terminal of Pycharm editor used for python programming. The error is as follows. 

Building wheel for cyarray (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\siddharth\pycharmprojects\sph_project\venv\scripts\python.exe' 'c:\users\siddharth\pycharmprojects\sph_project\venv\lib\site-packages\pip\_vendor\pep517\in_process\_
in_process.py' build_wheel 'C:\Users\SIDDHA~1\AppData\Local\Temp\tmp9dv9lxlu'
       cwd: C:\Users\SIDDHA~1\AppData\Local\Temp\pip-req-build-_e6lxcba\
  Complete output (38 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\cyarray
  copying cyarray\api.py -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\generator.py -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\__init__.py -> build\lib.win-amd64-3.6\cyarray
  creating build\lib.win-amd64-3.6\cyarray\tests
  copying cyarray\tests\test_carray.py -> build\lib.win-amd64-3.6\cyarray\tests
  copying cyarray\tests\__init__.py -> build\lib.win-amd64-3.6\cyarray\tests
  running egg_info
  writing cyarray.egg-info\PKG-INFO
  writing dependency_links to cyarray.egg-info\dependency_links.txt
  writing requirements to cyarray.egg-info\requires.txt
  writing top-level names to cyarray.egg-info\top_level.txt
  reading manifest file 'cyarray.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'Makefile'
  warning: no previously-included files matching '*.cpp' found under directory 'cyarray'
  adding license file 'LICENSE.txt'
  writing manifest file 'cyarray.egg-info\SOURCES.txt'
  copying cyarray\carray.cpp -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\carray.pxd -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\carray.pxd.mako -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\carray.pyx -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\carray.pyx.mako -> build\lib.win-amd64-3.6\cyarray
  copying cyarray\msstdint.h -> build\lib.win-amd64-3.6\cyarray
  running build_ext
  building 'cyarray.carray' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\cyarray
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Icyarray -IC:\Users\SIDDHA~1\AppData\
Local\Temp\pip-build-env-172sdsqh\overlay\Lib\site-packages\numpy\core\include -Ic:\users\siddharth\pycharmprojects\sph_project\venv\include -IC:\Python\Python36\include -IC:\Python\Pytho
n36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpcy
array/carray.cpp /Fobuild\temp.win-amd64-3.6\Release\cyarray/carray.obj
  carray.cpp
  C:\Python\Python36\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for cyarray
  Building wheel for compyle (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\siddharth\pycharmprojects\sph_project\venv\scripts\python.exe' 'c:\users\siddharth\pycharmprojects\sph_project\venv\lib\site-packages\pip\_vendor\pep517\in_process\_
in_process.py' build_wheel 'C:\Users\SIDDHA~1\AppData\Local\Temp\tmp9lr7jgod'
       cwd: C:\Users\SIDDHA~1\AppData\Local\Temp\pip-req-build-vwslhw5h\
  Complete output (60 lines):
  Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\compyle
  copying compyle\api.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\array.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\ast_utils.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\capture_stream.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\config.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\cuda.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\cython_generator.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\extern.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\ext_module.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\jit.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\low_level.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\opencl.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\parallel.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\profile.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\sort.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\template.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\translator.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\transpiler.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\types.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\utils.py -> build\lib.win-amd64-3.6\compyle
  copying compyle\__init__.py -> build\lib.win-amd64-3.6\compyle
  creating build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\py3_code.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_array.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_ast_utils.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_capture_stream.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_config.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_cuda.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_cython_generator.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_ext_module.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_gpu_struct.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_jit.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_low_level.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_parallel.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_profile.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_template.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_translator.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_transpiler.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_types.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\test_utils.py -> build\lib.win-amd64-3.6\compyle\tests
  copying compyle\tests\__init__.py -> build\lib.win-amd64-3.6\compyle\tests
  creating build\lib.win-amd64-3.6\compyle\thrust
  copying compyle\thrust\__init__.py -> build\lib.win-amd64-3.6\compyle\thrust
  running build_ext
  building 'compyle.thrust.sort' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\compyle
  creating build\temp.win-amd64-3.6\Release\compyle\thrust
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\siddharth\pycharmprojects\s
ph_project\venv\include -IC:\Python\Python36\include -IC:\Python\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:
\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpcompyle/thrust/sort.cpp /Fobuild\temp.win-amd64-3.6\Release\compyle/thrust/sort.obj
  sort.cpp
  C:\Python\Python36\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for compyle
Failed to build cyarray compyle
ERROR: Could not build wheels for cyarray, compyle, which is required to install pyproject.toml-based projects

I am unsure about why is the installing compyle is linking up with Visual studio and I am having trouble solving this error. 

As anyone is the group come across this error during your installations and have you attempted to solve this issue?

Thank you very much. Looking forward to your response. 

Best,
Siddharth

mutaa...@gmail.com

unread,
Oct 14, 2021, 3:14:46 AM10/14/21
to pysph-users
Reply all
Reply to author
Forward
0 new messages