Closed alexkolo closed 5 years ago
Uh... yikes.
My initial guess (and it's a guess!) is that this is to do with the C compiler. Anaconda is trying to use a combination of the system and it's own gcc in a confused manner, and therefore it can't find some internal libraries it's looking for.
I can't give you a cleaner answer than that as I don't really know - it's an Anaconda gcc issue, not pyatomdb, and it's way beyond my expertise.
One suggestion which might work is manually compiling the c code.
Find the file linear_approx.c and change to its directory then: gcc -shared -o linear_approx.so -fPIC linear_approx.c
maybe that'll work?
Thanks. I will try this and also look into anaconda gcc issue.
I think it's something to do with 32 vs 64 bit compiled libraries, but don't quote me on that
so this gcc -shared -o linear_approx.so -fPIC linear_approx.c
worked.
import pyatomdb
didn't give an error.
I'm currently running pyatomdb.util.initialize()
(downloading some files).
I will update here, if I run into any issues.
So far, everything works fine. I was able to reproduce the emissivity of XSPEC to high accuracy.
Great. I am going to close this, though I know it's not exactly fixed as such.
So, I had the same issue stated here when installing a totally different python package, where something needed to be compiled during the installation. Based on this I found a solution, which also works here. One needs to install anacondas most recent compiler before the package installation:
conda install -c anaconda gcc_linux-64
The inspiration came when studying this site:
Thank you! This is great to know for the future.
Since I stumbled over this while searching for the same error in another package:
This seems to be cause by conda using its own ld
. It can also be fixed by removing that linker and replacing it with a link to the system linker, see https://github.com/pytorch/pytorch/issues/16683#issuecomment-459982988
Thanks a lot for this comment. This also explains why installing anacondas most recent compiler solved the issue, which is probably also the safer fix in comparison to temporarily renaming conda's own ld
as suggested in https://github.com/pytorch/pytorch/issues/16683
Below is the full error message. Any ideas?
FYI, same result when using
pip
.