Welcome to ask.woodem.org. You may post when you login through your GitHub account.

"PyInit__cxxInternal" error when run woo in the console

+1 vote
81 views
asked Oct 4, 2018 by Snowbughappyboy (190 points)

i installed the woodem on ubuntu18.04.1 by using the following command,

sudo add-apt-repository ppa:eudoxos/woo-daily
sudo apt-get update
sudo apt-get install python3-woo

after that, when i input the woo the following error happens,

WARN: adding /home/eudoxos/minieigen11/build to path for _minieigen11
Error importing woo._cxxInternal (--flavor= ).
Traceback (most recent call last):
  File "/usr/bin/woo", line 11, in <module>
    load_entry_point('woo===1.1-4051-40-ubuntu18.04.1', 'console_scripts', 'woo')()
  File "/usr/lib/python3/dist-packages/wooMain.py", line 244, in main
    import woo.tests
  File "/usr/lib/python3/dist-packages/woo/__init__.py", line 147, in <module>
    _cxxInternal=__import__('woo.'+cxxInternalName,fromlist='woo')
ImportError: dynamic module does not define module export function (PyInit__cxxInternal)
Segmentation fault (core dumped)

 

Thanks a lot. 

1 Answer

0 votes
answered Oct 4, 2018 by eudoxos (48,570 points)

Hi, unfortunately it seems the packages in the PPA are broken. The best what you can do is install from the source using a script which will setup everything.

This basically does what is described in https://woodem.org/user/installation.html#compilation-from-source but in an automated manner; you will have everything installed in /usr/local and you will be able to use woo -RR to update. Ubuntu 18.04 LTS is the most tested distribution at the moment.

I cannot update the documentation directly now, being away, sorry for that.

HTH, Vaclav

commented Oct 4, 2018 by Snowbughappyboy (190 points)
edited Oct 5, 2018 by Snowbughappyboy

Thanks for your help. But that did not succeed. I tried your method, but when i using the code following,
sudo -H python3 woo-install.py, the following erros comes,

Then i think maybe the scons has not been installed. Then i input the command below,

`sudo apt-get install scons `

Then the scons installed as expected. Then i do the install command again,

`sudo -H python3 woo-install.py`

Then these information comes,

...........
...........

File "woo-install.py", line 41, in call
if not failOk and ret!=0: raise RuntimeError('Error calling: '+' '.join(cmd))
RuntimeError: Error calling: scons -C /root/woo flavor= features=gts,openmp,vtk,hdf5,qt5,opengl jobs=8 buildPrefix=/root/woo-build CPPPATH=/usr/include/eigen3:/usr/include/hdf5/serial:/usr/include/vtk-6.3 CXX=g++ brief=1 debug=0 PYTHON=/usr/bin/python3

Cry again.

By the way i have tried the Compilation from source by the following command,

git clone https://github.com/woodem/woo.git

python3 setup.py

It was not helpful also.

Thanks,

Xuesong

commented Oct 5, 2018 by eudoxos (48,570 points)

Don't use setup.py, it produces those broken packages. Maybe you don't have ccache installed? Are you installing as root? Don't do that, use a regular use account (security practices). You can run scons (the whle command shown above, ending with PYTHON=/usr/bin/python3 by hand to see what's wrong. There will be a log produced.

commented Oct 5, 2018 by Snowbughappyboy (190 points)
edited Oct 5, 2018 by Snowbughappyboy

Thanks. Sorry for not providing the necessary information for fixing the problem. I installed the ccache, and first tried

sudo python3 woo-install.py  

failed, and then tried,

scons -C /home/virpc/woo flavor= features=gts,openmp,vtk,hdf5,qt5,opengl jobs=8 buildPrefix=/home/virpc/woo-build CPPPATH=/usr/include/eigen3:/usr/include/hdf5/serial:/usr/include/vtk-6.3 CXX=g++ brief=1 debug=0 PYTHON=/usr/bin/python3

Failed. But these have the same problem,

enter image description here

I think it is the problem with xlwt, but i don't know how to fix it.

Below is the config.log file, i don't know if you need it or not.

https://drive.google.com/file/d/1OwQB-Y7GuEkuRidHjCFHsjPjGKnG48cX/view?usp=sharing

Thanks again.

Xuesong

commented Oct 6, 2018 by eudoxos (48,570 points)

Okay, that is a bug in xlwt-future (https://github.com/python-excel/xlwt/issues/94) which was meanwhile fixed in xlwt. So do this pip3 uninstall xlwt-future and pip3 install xlwt. I adjusted the install script already, but you should be fine running these two and then scons.

commented Oct 6, 2018 by Snowbughappyboy (190 points)
edited Oct 6, 2018 by Snowbughappyboy

Sorry for the new problems, with the new woo-install.py file. i think this relevant to the gcc compiler.

enter image description here
enter image description here

Thanks again,

Xuesong

commented Oct 6, 2018 by eudoxos (48,570 points)

To me this looks like out-of-memory. When you say jobs=8, do you have enough RAM? Count 4GB per core (or better 5GB) for parallel compilation. (see https://woodem.org/user/installation.html#compilation-from-source for jobs documentation where this is mentioned).

commented Oct 7, 2018 by Snowbughappyboy (190 points)
edited Oct 7, 2018 by Snowbughappyboy

Hi, i have changed the job number and input,

sudo scons jobs=2 CXX='ccache g++' features=qt4,opengl,vtk,openmp,gts PYTHON=/usr/bin/python3

The error comes up,

EnvironmentError: No tool named 'qt4': not a Zip file:
File "/home/virpc/SConstruct", line 529:
env.Tool('qt4')
File "/usr/lib/scons/SCons/Environment.py", line 1788:
tool = SCons.Tool.Tool(tool, toolpath, **kw)
File "/usr/lib/scons/SCons/Tool/__init__.py", line 118:
module = self.toolmodule()
File "/usr/lib/scons/SCons/Tool/__init__.py", line 272:
raise SCons.Errors.EnvironmentError(m)

I have installed the python3-pyqt4, but does not help.
.....

Then i tried another way, i increase the ram for 32g and 4 cores,

sudo python3 woo-install.py 

The errors,
enter image description here

Why do i have so many problems to install?
Thanks,
Xuesong

commented Oct 7, 2018 by eudoxos (48,570 points)

For the first one, please compile with qt5 feature, not qt4, that is obsolete. The second one, let me check later about in one week. Sorry for the problems, I did some changes inserialization just before leaving and perhaps I left it in a state which is not 100% good. Also make sure you uninstalled the python3-woo package (sudo dpkg --remove python3-woo) otherwise the two installation might clash.

commented Oct 11, 2018 by MaxWiebicke (500 points)

Hi Vaclav,
I have exactly the same problem.
Best regards,
Max

commented Oct 13, 2018 by eudoxos (48,570 points)

All should be fixed in git now, sorry for the issues. Please let me know if something is broken. v

commented Oct 14, 2018 by Snowbughappyboy (190 points)

Hi eudoxos,

This time i used this command to install,

$ wget https://raw.githubusercontent.com/woodem/woo/master/scripts/woo-install.py
$ python3 woo-install.py

Then get this issue,

enter image description here

commented Oct 14, 2018 by eudoxos (48,570 points)

Ok, this one should be fixed now. It was a recent regression, newer compilers are okay there so I thought I remove the workaround there :) Try again, should be okay.

commented Oct 15, 2018 by MaxWiebicke (500 points)

Hi Vaclav,
the build seems to work for me now.
I get an error however, when I want to start woo -- it seems to be related to IPython; altough ipython works for me in any other case.

enter image description here

commented Oct 15, 2018 by Snowbughappyboy (190 points)

Hi,
How can you install it? I still have problems to install it.

enter image description here
enter image description here

There are so many other similar errors, here i did not upload all.

So what's the problem now?

Thanks,

commented Oct 15, 2018 by eudoxos (48,570 points)

@Snowbughappyboy, please, what is your system config? Distro version &c? I will try. This is not normal what you show, perhaps several boost::python versions installed or something like this.

commented Oct 15, 2018 by eudoxos (48,570 points)

@MaxWiebicke, there is the warning about unrecognized ipython version. It should be fixed now, provided the API did not change (much). Support of all (even ancient) versions is getting a bit out of hand - python 2.x, 3.x, ipython 0.11 all way up to 8.0, vtk 5.x, 6.x, 7.x, qt 4.x and 5.x

commented Oct 15, 2018 by Snowbughappyboy (190 points)

My system is ubuntu 18.04.1 LTS. I will try a new system. Thanks.

commented Oct 15, 2018 by Snowbughappyboy (190 points)

My system is ubuntu 18.04.1 LTS. I will try a new system. Thanks.

When i use the typical method to install,

sudo apt-get install python3-woo 

I think it succeed, but after i input woo, it says similar problem with @MaxWiebicke,
enter image description here
enter image description here

commented Oct 15, 2018 by eudoxos (48,570 points)

The last image is not showing any problem...? as far as I see.

commented Oct 15, 2018 by Snowbughappyboy (190 points)

Oh, yes. It works now. I have tried a test case. So maybe the installing method using the code of python3 woo-install.py has some problems.

BTW, what does the import warning mean at the beginning? like,

ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)

Thanks very much.

commented Oct 16, 2018 by eudoxos (48,570 points)

That is a warning which actually comes from h5py which we can't do nothing about. I put warning filter around the h5py import, it should not appear anymore now.

...