tschoonj / xraylib

A library for X-ray matter interaction cross sections for X-ray fluorescence applications
https://github.com/tschoonj/xraylib/wiki
Other
123 stars 56 forks source link

Can import xraylib_np, but not xraylib #90

Closed toww1g15 closed 5 years ago

toww1g15 commented 5 years ago

Hi, I'm following the compilation from source instructions on the wiki, but I keep running into a problem- while I'm able to import the xraylib_np module, I cannot import xraylib, getting an ImportError: No module named xraylib error.

Regarding the install, I've tried a combination of ./configure and ./configure --enable-python-integration, and sudo make check always reports 3 passes on 3 checks.

Perhaps important to note: To begin with, on importing xraylib_np I would also get a ImportError: libxrl.so.7: cannot open shared object file: No such file or directory error. I fixed this by adding a .conf file in /etc/ld.so.conf.d/ that contained the path to the directory that contained libxrl.so.7 (/usr/local/lib)

I'm using Linux Mint 18.3 Cinnamon 64-bit, using the Linux 4.10.0-38-generic Kernel. As an aside, do you know if this is compatible with any of the packages you've compiled for Ubuntu? apt-get would be a lifesaver!

Apologies if this issue has a fairly trivial solution; I don't have a massive amount of experience with Linux systems. Thanks,

Toby

tschoonj commented 5 years ago

Hey Toby,

I think you don't have swig installed on your system, which is necessary to compile the classic python bindings. After installing swig, you will need to re-run configure and run make, sudo make install again.

I have never used Linux Mint, and have no idea what packages they use so I'm afraid I cannot help you there 😢

Best,

Tom

toww1g15 commented 5 years ago

Hey Tom, Thanks for getting back to me so quickly, installing swig and re-running configure, make and make install did the trick

Best, Toby

tschoonj commented 5 years ago

Ok, glad to read you got it working.

Best,

Tom