Postprocessing using mayavi for python 3
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
Regards, Firdaus
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
Since I'm currently using conda to install sfepy, I can't install mayavi inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict:
- mayavi -> python 2.7*
- python 3.6* Use "conda info <package>" to see the dependencies for each package.
Do you have any other advise for visualization, maybe using matplotlib or other packages (eg. http://vispy.org/ )?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict:
- mayavi -> python 2.7*
- python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulation/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
After I made another conda environment based on python 2.7 and install sfepy there, I managed to install mayavi too.
A small problem after that is a runtime error: Invalid Qt API ‘pyqt5’, valid values are: ‘pyqt’ or ‘pyside’, but solvable after I put
import os os.environ["QT_API"] = "pyqt"
in the beginning of the script.
I'm talking about the example script here: http://sfepy.org/doc-devel/_downloads/linear_elastic_interactive.py Using Spyder editor, at least now the script runs fine, and generated 2 vtk files (linear_elasticity.vtk and regions.vtk). However, the viewer doesn't seems to work. Since I got no figure displayed after running the script.
Is there anything I miss?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:38 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict:
- mayavi -> python 2.7*
- python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or
other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulatio n/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
I realise I forgot to run with the "show" option. Hence, now from Ipython console I give command
%run linear_leastic_interactive.py -s or
%run linear_leastic_interactive.py --show
Which seems trying to show the viewer, but resulted to an Import Error, see below. Any suggestion?
Thanks.
Regards, Firdaus
ImportError: Could not import backend for traits
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt projects installed. If you installed Mayavi with easy_install, try easy_install <pkg_name>. easy_install Mayavi[app] will also work.
If you performed a source checkout, be sure to run 'python setup.py install' in Traits, TraitsGUI, and the Traits backend of your choice.
Also make sure that either wxPython or PyQT is installed. wxPython: http://www.wxpython.org/ PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
On Fri, Jul 14, 2017 at 11:48 AM, firdaus prabowo <firdaus.prabowo@gmail.com
wrote:
After I made another conda environment based on python 2.7 and install sfepy there, I managed to install mayavi too.
A small problem after that is a runtime error: Invalid Qt API ‘pyqt5’, valid values are: ‘pyqt’ or ‘pyside’, but solvable after I put
import os os.environ["QT_API"] = "pyqt"
in the beginning of the script.
I'm talking about the example script here: http://sfepy.org/doc-devel/_ downloads/linear_elastic_interactive.py Using Spyder editor, at least now the script runs fine, and generated 2 vtk files (linear_elasticity.vtk and regions.vtk). However, the viewer doesn't seems to work. Since I got no figure displayed after running the script.
Is there anything I miss?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:38 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict:
- mayavi -> python 2.7*
- python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or
other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulatio n/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
On 07/14/2017 10:27 AM, firdaus prabowo wrote:
I realise I forgot to run with the "show" option. Hence, now from Ipython console I give command
%run linear_leastic_interactive.py -s or
%run linear_leastic_interactive.py --show
Which seems trying to show the viewer, but resulted to an Import Error, see below. Any suggestion?
Thanks.
Regards, Firdaus
ImportError: Could not import backend for traits
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt projects installed. If you installed Mayavi with easy_install, try easy_install <pkg_name>. easy_install Mayavi[app] will also work.
If you performed a source checkout, be sure to run 'python setup.py install' in Traits, TraitsGUI, and the Traits backend of your choice.
Also make sure that either wxPython or PyQT is installed. wxPython: http://www.wxpython.org/ PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Did you install mayavi using a conda recipe or otherwise? Does mayavi work by itself? If yes, then it is a problem of sfepy, if not, it is a problem of mayavi installation - a missing backend, or a wrong backend selected.
I have found some related issue that might help: https://github.com/enthought/mayavi/issues/483
r.
On Fri, Jul 14, 2017 at 11:48 AM, firdaus prabowo <firdaus.prabowo@gmail.com
wrote:
After I made another conda environment based on python 2.7 and install sfepy there, I managed to install mayavi too.
A small problem after that is a runtime error: Invalid Qt API ‘pyqt5’, valid values are: ‘pyqt’ or ‘pyside’, but solvable after I put
import os os.environ["QT_API"] = "pyqt"
in the beginning of the script.
I'm talking about the example script here: http://sfepy.org/doc-devel/_ downloads/linear_elastic_interactive.py Using Spyder editor, at least now the script runs fine, and generated 2 vtk files (linear_elasticity.vtk and regions.vtk). However, the viewer doesn't seems to work. Since I got no figure displayed after running the script.
Is there anything I miss?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:38 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict: - mayavi -> python 2.7* - python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or
other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulatio n/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
It seems that postprocessing involving mayavi is not working in python 3.6, simply because mayavi so far only support python 2. Am I correct?
According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
Good suggestion, it seems working now! A snapshot is attached.
I tried the last advice from the thread
conda install - c conda-forge pyside
Along while installing pyside, it also automatically supersede current installation of pyqt5 from main anaconda channel and instead installed pyqt4 from conda-forge channel.
Thanks.
Regards, Firdaus
On Fri, Jul 14, 2017 at 5:27 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/14/2017 10:27 AM, firdaus prabowo wrote:
I realise I forgot to run with the "show" option. Hence, now from Ipython console I give command
%run linear_leastic_interactive.py -s or
%run linear_leastic_interactive.py --show
Which seems trying to show the viewer, but resulted to an Import Error, see below. Any suggestion?
Thanks.
Regards, Firdaus
ImportError: Could not import backend for traits
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt projects installed. If you installed Mayavi with easy_install, try easy_install <pkg_name>. easy_install Mayavi[app] will also work.
If you performed a source checkout, be sure to run 'python setup.py install' in Traits, TraitsGUI, and the Traits backend of your choice.
Also make sure that either wxPython or PyQT is installed. wxPython: http://www.wxpython.org/ PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Did you install mayavi using a conda recipe or otherwise? Does mayavi work by itself? If yes, then it is a problem of sfepy, if not, it is a problem of mayavi installation - a missing backend, or a wrong backend selected.
I have found some related issue that might help: https://github.com/enthought/mayavi/issues/483
r.
On Fri, Jul 14, 2017 at 11:48 AM, firdaus prabowo < firdaus.prabowo@gmail.com
wrote:
After I made another conda environment based on python 2.7 and install
sfepy there, I managed to install mayavi too.
A small problem after that is a runtime error: Invalid Qt API ‘pyqt5’, valid values are: ‘pyqt’ or ‘pyside’, but solvable after I put
import os os.environ["QT_API"] = "pyqt"
in the beginning of the script.
I'm talking about the example script here: http://sfepy.org/doc-devel/_ downloads/linear_elastic_interactive.py Using Spyder editor, at least now the script runs fine, and generated 2 vtk files (linear_elasticity.vtk and regions.vtk). However, the viewer doesn't seems to work. Since I got no figure displayed after running the script.
Is there anything I miss?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:38 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi
inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict: - mayavi -> python 2.7* - python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or
other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulatio n/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz>
wrote:
Hi Firdaus,
On 07/12/2017 09:27 AM, firdaus prabowo wrote:
Hi,
> > It seems that postprocessing involving mayavi is not working in > python > 3.6, > simply because mayavi so far only support python 2. Am I correct? > > > According to [1], mayavi supports 3.6, but it may not be packaged for your system yet. But even then there might be some issues with postproc.py (some known [2]), as the mayavi API changes slightly between releases. However, you might still be able to use directly the mayavi application with your results in VTK format.
r.
[1] https://github.com/enthought/mayavi/issues/496 [2] https://github.com/sfepy/sfepy/issues/394
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
On 07/14/2017 11:55 AM, firdaus prabowo wrote:
Good suggestion, it seems working now! A snapshot is attached.
OK, glad that worked.
I tried the last advice from the thread
conda install - c conda-forge pyside
Along while installing pyside, it also automatically supersede current installation of pyqt5 from main anaconda channel and instead installed pyqt4 from conda-forge channel.
Thanks for the info!
r.
On Fri, Jul 14, 2017 at 5:27 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/14/2017 10:27 AM, firdaus prabowo wrote:
I realise I forgot to run with the "show" option. Hence, now from Ipython console I give command
%run linear_leastic_interactive.py -s or
%run linear_leastic_interactive.py --show
Which seems trying to show the viewer, but resulted to an Import Error, see below. Any suggestion?
Thanks.
Regards, Firdaus
ImportError: Could not import backend for traits
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt projects installed. If you installed Mayavi with easy_install, try easy_install <pkg_name>. easy_install Mayavi[app] will also work.
If you performed a source checkout, be sure to run 'python setup.py install' in Traits, TraitsGUI, and the Traits backend of your choice.
Also make sure that either wxPython or PyQT is installed. wxPython: http://www.wxpython.org/ PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Did you install mayavi using a conda recipe or otherwise? Does mayavi work by itself? If yes, then it is a problem of sfepy, if not, it is a problem of mayavi installation - a missing backend, or a wrong backend selected.
I have found some related issue that might help: https://github.com/enthought/mayavi/issues/483
r.
On Fri, Jul 14, 2017 at 11:48 AM, firdaus prabowo < firdaus.prabowo@gmail.com
wrote:
After I made another conda environment based on python 2.7 and install
sfepy there, I managed to install mayavi too.
A small problem after that is a runtime error: Invalid Qt API ‘pyqt5’, valid values are: ‘pyqt’ or ‘pyside’, but solvable after I put
import os os.environ["QT_API"] = "pyqt"
in the beginning of the script.
I'm talking about the example script here: http://sfepy.org/doc-devel/_ downloads/linear_elastic_interactive.py Using Spyder editor, at least now the script runs fine, and generated 2 vtk files (linear_elasticity.vtk and regions.vtk). However, the viewer doesn't seems to work. Since I got no figure displayed after running the script.
Is there anything I miss?
Thanks.
Regards, Firdaus
On Wed, Jul 12, 2017 at 4:38 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
On 07/12/2017 10:12 AM, firdaus prabowo wrote:
Since I'm currently using conda to install sfepy, I can't install mayavi
inside the conda environment.
UnsatisfiableError: The following specifications were found to be in conflict: - mayavi -> python 2.7* - python 3.6* Use "conda info <package>" to see the dependencies for each package.
I see, so it is not packaged for conda yet.
Do you have any other advise for visualization, maybe using matplotlib or
other packages (eg. http://vispy.org/ )?
You can try paraview (https://www.paraview.org/) - I use it too occasionally, especially for large problems. Then there are other packages capable of displaying VTK files (e.g. https://wci.llnl.gov/simulatio n/computer-codes/visit/), but I have no experience with them. Let us know if you have success with vispy.
r.
On Wed, Jul 12, 2017 at 4:01 PM, Robert Cimrman <cimrman3@ntc.zcu.cz>
wrote:
Hi Firdaus,
> > On 07/12/2017 09:27 AM, firdaus prabowo wrote: > > Hi, > >> >> It seems that postprocessing involving mayavi is not working in >> python >> 3.6, >> simply because mayavi so far only support python 2. Am I correct? >> >> >> According to [1], mayavi supports 3.6, but it may not be packaged for > your > system yet. But even then there might be some issues with postproc.py > (some > known [2]), as the mayavi API changes slightly between releases. > However, > you might still be able to use directly the mayavi application with > your > results in VTK format. > > r. > > [1] https://github.com/enthought/mayavi/issues/496 > [2] https://github.com/sfepy/sfepy/issues/394
참여자 (2)
-
firdaus prabowo -
Robert Cimrman