FXIhub / condor

Condor: a simulation tool for flash X-ray imaging
http://lmb.icm.uu.se/condor
BSD 2-Clause "Simplified" License
25 stars 14 forks source link

can not import spism module #20

Closed Lawryle closed 4 years ago

Lawryle commented 6 years ago

I have installed the condor successfully according to the docs. But when I python example.py, the error occurs.

>>> Example 4/17: PARTICLE ATOMS (configfile)
cd /home/yxli/air/condor/examples/configfile/particle_atoms; rm -f condor.cxi; condor
[start output]
dynamic module does not define module export function (PyInit__spsim_pybackend)
ERROR:  Cannot import spsim module. This module is necessary to simulate diffraction for particle model of discrete atoms. Please install spsim from https://github.com/FilipeMaia/spsim and try again.
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/spsim_pybackend.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 583, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1043, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit__spsim_pybackend)

I tried to reinstall the spsim, but it still did not work. Spsim module can not be imported, and I don not know how to deal with it.

FilipeMaia commented 6 years ago

You have to enable the python bindings of spsim.

mhantke commented 4 years ago

I close this for now, @Lawryle please let us know if this problem persists.