GithubHelp home page GithubHelp logo

Comments (11)

rmjarvis avatar rmjarvis commented on June 14, 2024 1

The error you are showing seems to be in flask, not TreeCorr. I don't know anything about flask, so there's not much I can do with this.

from treecorr.

rmjarvis avatar rmjarvis commented on June 14, 2024

It looks like this is a "feature" of Python3.4. http://stackoverflow.com/questions/25235013/cythondistutils-build-on-ubuntu-python-3-changes-the-module-lib-name-during-lin

I agree with the author of that SO question, "I feel a rant coming on." Why would they make this idiotic change? It serves no apparent purpose other than to break existing code that expects them to be sensible.

Anyway, when I get some time, I'll look into it. Maybe there is something in distutils that will return the actual library name that they build, which I can write somewhere so we can load the correct file.

from treecorr.

rmjarvis avatar rmjarvis commented on June 14, 2024

@gogrean I believe this is fixed now with TreeCorr 3.3.6.

Please try pip install -U treecorr and see if it works on your system.

from treecorr.

rmjarvis avatar rmjarvis commented on June 14, 2024

Assuming this is resolved.

from treecorr.

niteshb0804 avatar niteshb0804 commented on June 14, 2024

Same error but Python2.7

import treecorr
.
.
OSError: cannot load library '/home/nitesh/anaconda2/lib/python2.7/site-packages/treecorr/_treecorr.so': /home/nitesh/anaconda2/lib/python2.7/site-packages/treecorr/_treecorr.so: undefined symbol: GOMP_parallel. Additionally, ctypes.util.find_library() did not manage to locate a library called '/home/nitesh/anaconda2/lib/python2.7/site-packages/treecorr/_treecorr.so'

Any suggestions? I tried reinstalling, upgrade treecorr...

from treecorr.

rmjarvis avatar rmjarvis commented on June 14, 2024

This normally means you are loading the wrong libgomp library at runtime. Anaconda is tricky because they have their own libgomp file. And they can have (if you do conda install gcc) their own compiler. So you need to make sure you have your environment variables set correctly to load the right library.

Typically, this is done by setting your LD_LIBRARY_PATH to include the anaconda2/lib directory, which is probably where the correct libgomp is located. And also set your PATH to include anaconda2/bin to get their compiler.

You can check which libgomp library treecorr was compiled to use with

$ ldd /home/nitesh/anaconda2/lib/python2.7/site-packages/treecorr/_treecorr.so

On a machine I have using anaconda, this is what is output:

$ ldd ~/work/.conda/envs/py2.7/lib/python2.7/site-packages/TreeCorr-3.4-py2.7-linux-x86_64.egg/treecorr/_treecorr.so
	linux-vdso.so.1 =>  (0x00007ffdc44e0000)
	libpython2.7.so.1.0 => /astro/u/mjarvis/.conda/envs/py2.7/lib/libpython2.7.so.1.0 (0x00007fe1fbefc000)
	libstdc++.so.6 => /astro/u/mjarvis/.conda/envs/py2.7/lib/libstdc++.so.6 (0x00007fe1fbbc2000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fe1fb93e000)
	libgomp.so.1 => /astro/u/mjarvis/.conda/envs/py2.7/lib/libgomp.so.1 (0x00007fe1fb71b000)
	libgcc_s.so.1 => /astro/u/mjarvis/.conda/envs/py2.7/lib/libgcc_s.so.1 (0x00007fe1fb509000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe1fb2ec000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fe1faf58000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fe1fad54000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007fe1fab51000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe1fc5bc000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fe1fa949000)

And the /astro/u/mjarvis/.conda/envs/py2.7/lib/ directory is in my LD_LIBRARY_PATH environment variable. If you have a different libgomp library in your library path, then you can sometimes get mismatches in what setup.py found at build time and what python finds at runtime.

Without more details about your particular setup, I can't really diagnose further, but hopefully this gives you enough to investigate on your own.

from treecorr.

niteshb0804 avatar niteshb0804 commented on June 14, 2024

from treecorr.

rmjarvis avatar rmjarvis commented on June 14, 2024

Apparently not. It depends on what compiler gets used by setup.py and what your LD_LIBRARY_PATH is. The problem is some kind of mismatch between what gets used at build time and what is found at run time.

My best guess is that your compiler is not the Anaconda gcc, but rather the system gcc, which has its own libgomp that is not the one listed above. Hence a mismatch. You might have success with switching to the Anaconda compiler (via conda install gcc).

But I can't properly diagnose this from what you've posted. You'll need to investigate this on your own some I'm afraid.

from treecorr.

niteshb0804 avatar niteshb0804 commented on June 14, 2024

from treecorr.

Hasibus avatar Hasibus commented on June 14, 2024

HI ,
I am facing also Anconda 3 Library error problem when I run of my python script
anaconda3

from treecorr.

Hasibus avatar Hasibus commented on June 14, 2024

Thanls .

The error you are showing seems to be in flask, not TreeCorr. I don't know anything about flask, so there's not much I can do with this.

Thanks.
Someone please help me

from treecorr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.