enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.32k stars 285 forks source link

problem "Building TVTK classes..." #489

Open andram opened 7 years ago

andram commented 7 years ago

I tried to install the git version of mayavi on Arch Linux with python3 compiled vtk.

After "pip install --user ." I get the following error:

`>pip install --user . Processing /home/amann/junk/mayavi Requirement already satisfied: apptools in /usr/lib/python3.6/site-packages (from mayavi==4.5.1.dev0) Requirement already satisfied: traits in /usr/lib/python3.6/site-packages (from mayavi==4.5.1.dev0) Requirement already satisfied: traitsui in /usr/lib/python3.6/site-packages (from mayavi==4.5.1.dev0) Requirement already satisfied: configobj in /usr/lib/python3.6/site-packages (from apptools->mayavi==4.5.1.dev0) Requirement already satisfied: pyface in /usr/lib/python3.6/site-packages (from traitsui->mayavi==4.5.1.dev0) Requirement already satisfied: pygments in /usr/lib/python3.6/site-packages (from pyface->traitsui->mayavi==4.5.1.dev0) Installing collected packages: mayavi Running setup.py install for mayavi ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-0lnsxn94-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-8jqmwmo4-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build

Building TVTK classes... terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-0lnsxn94-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-8jqmwmo4-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code -6 in /tmp/pip-0lnsxn94-build/ `

Any ideas what could be wrong? Software installed:

python-3.6.0 vtk-7.1.0

thomasfrimannkoren commented 7 years ago

I got it to compile by exhanging this line with

if key == "Communicator":
    default = None
else:
    default = getattr(obj, 'Get%s'%key)()

The problem seems to be with the getCommunicator-method of vtkPLineIntegralConvolution2D.

Mayavi seems to run without errors after this.

andram commented 7 years ago

Thanks! I confirm that I am able to compile mayavi with this change. Would be nice to incorporate in mainline.