AlexSafatli/Pylogeny

Installation error: Symbol not found: _memalign

audy opened this issue · 10 comments

audy commented

TraceBack:


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-027cc924d852> in <module>()
      1 from pylogeny.alignment import alignment
----> 2 from pylogeny.landscape import landscape
      3 from pylogeny.heuristic import parsimonyGreedy
      4 
      5 ali = alignment('yourAlignment.fasta')

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/landscape.py in <module>()
      7 import networkx
      8 from random import choice
----> 9 from scoring import getParsimonyFromProfiles as parsimony, getLogLikelihood as ll
     10 from parsimony import profile_set as profiles
     11 from bipartition import bipartition

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/scoring.py in <module>()
      5 # E-mail: safatli@cs.dal.ca
      6 
----> 7 import pll, parsimony, fitch, p4
      8 try:
      9     from model import DiscreteStateModel as State

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/pll.py in <module>()
      5 # E-mail: safatli@cs.dal.ca
      6 
----> 7 from pylibpll import *
      8 from tempfile import NamedTemporaryFile as NTempFile
      9 import os

ImportError: dlopen(/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylibpll.so, 2): Symbol not found: _memalign
  Referenced from: /usr/local/lib/libpll-generic.1.dylib
  Expected in: flat namespace
 in /usr/local/lib/libpll-generic.1.dylib

Result of pip freeze:

DendroPy==3.12.2
bitarray==0.8.1
networkx==1.9.1
numpy==1.9.0
p4==0.92.-2014.10.30-
pandas==0.14.1

Using libpll 1.0.0

On Mac OS X Yosemite (which OS are you using? I'd like to use this but can't right now).

Checking for you right now. Don't think I've seen this error yet, but it
definitely appears to be a problem with libpll.

On Mon, Nov 10, 2014 at 5:02 PM, Austin Richardson <notifications@github.com

wrote:

TraceBack:


ImportError Traceback (most recent call last)
in ()
1 from pylogeny.alignment import alignment
----> 2 from pylogeny.landscape import landscape
3 from pylogeny.heuristic import parsimonyGreedy
4
5 ali = alignment('yourAlignment.fasta')

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/landscape.py in ()
7 import networkx
8 from random import choice
----> 9 from scoring import getParsimonyFromProfiles as parsimony, getLogLikelihood as ll
10 from parsimony import profile_set as profiles
11 from bipartition import bipartition

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/scoring.py in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 import pll, parsimony, fitch, p4
8 try:
9 from model import DiscreteStateModel as State

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/pll.py in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 from pylibpll import *
8 from tempfile import NamedTemporaryFile as NTempFile
9 import os

ImportError: dlopen(/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylibpll.so, 2): Symbol not found: _memalign
Referenced from: /usr/local/lib/libpll-generic.1.dylib
Expected in: flat namespace
in /usr/local/lib/libpll-generic.1.dylib

Result of pip freeze:

DendroPy==3.12.2
bitarray==0.8.1
networkx==1.9.1
numpy==1.9.0
p4==0.92.-2014.10.30-
pandas==0.14.1

Using libpll 1.0.0

On Mac OS X Yosemite (which OS are you using? I'd like to use this but
can't right now).


Reply to this email directly or view it on GitHub
#1.

audy commented

Which version of libpll are you using?

On Nov 10, 2014, at 5:06 PM, Alex Safatli notifications@github.com wrote:

Checking for you right now. Don't think I've seen this error yet, but it
definitely appears to be a problem with libpll.

On Mon, Nov 10, 2014 at 5:02 PM, Austin Richardson <notifications@github.com

wrote:

TraceBack:


ImportError Traceback (most recent call last)
in ()
1 from pylogeny.alignment import alignment
----> 2 from pylogeny.landscape import landscape
3 from pylogeny.heuristic import parsimonyGreedy
4
5 ali = alignment('yourAlignment.fasta')

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/landscape.py in ()
7 import networkx
8 from random import choice
----> 9 from scoring import getParsimonyFromProfiles as parsimony, getLogLikelihood as ll
10 from parsimony import profile_set as profiles
11 from bipartition import bipartition

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/scoring.py in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 import pll, parsimony, fitch, p4
8 try:
9 from model import DiscreteStateModel as State

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/pll.py in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 from pylibpll import *
8 from tempfile import NamedTemporaryFile as NTempFile
9 import os

ImportError: dlopen(/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylibpll.so, 2): Symbol not found: _memalign
Referenced from: /usr/local/lib/libpll-generic.1.dylib
Expected in: flat namespace
in /usr/local/lib/libpll-generic.1.dylib

Result of pip freeze:

DendroPy==3.12.2
bitarray==0.8.1
networkx==1.9.1
numpy==1.9.0
p4==0.92.-2014.10.30-
pandas==0.14.1

Using libpll 1.0.0

On Mac OS X Yosemite (which OS are you using? I'd like to use this but
can't right now).


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub.

I just replicated this on my Mac desktop running Yosemite. I had not tried
to install it on Mac OS X, since I built it all in Linux, but I figured it
would still work. My mistake, apparently. It appears to be a libpll issue,
definitely, where it is expecting to find the memalign() function which is
apparently not present in Mac OS X. So much for libpll intending to be
multi-platform. I'm using 1.0.0 for libpll (the version and source present
on the main website). I don't know how to fix this just yet, but I'll look
around.

On Mon, Nov 10, 2014 at 6:46 PM, Austin Richardson <notifications@github.com

wrote:

Which version of libpll are you using?

On Nov 10, 2014, at 5:06 PM, Alex Safatli notifications@github.com
wrote:

Checking for you right now. Don't think I've seen this error yet, but it
definitely appears to be a problem with libpll.

On Mon, Nov 10, 2014 at 5:02 PM, Austin Richardson <
notifications@github.com

wrote:

TraceBack:


ImportError Traceback (most recent call last)
in ()
1 from pylogeny.alignment import alignment
----> 2 from pylogeny.landscape import landscape
3 from pylogeny.heuristic import parsimonyGreedy
4
5 ali = alignment('yourAlignment.fasta')

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/landscape.py
in ()
7 import networkx
8 from random import choice
----> 9 from scoring import getParsimonyFromProfiles as parsimony,
getLogLikelihood as ll
10 from parsimony import profile_set as profiles
11 from bipartition import bipartition

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/scoring.py
in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 import pll, parsimony, fitch, p4
8 try:
9 from model import DiscreteStateModel as State

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/pll.py
in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 from pylibpll import *
8 from tempfile import NamedTemporaryFile as NTempFile
9 import os

ImportError:
dlopen(/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylibpll.so,
2): Symbol not found: _memalign
Referenced from: /usr/local/lib/libpll-generic.1.dylib
Expected in: flat namespace
in /usr/local/lib/libpll-generic.1.dylib

Result of pip freeze:

DendroPy==3.12.2
bitarray==0.8.1
networkx==1.9.1
numpy==1.9.0
p4==0.92.-2014.10.30-
pandas==0.14.1

Using libpll 1.0.0

On Mac OS X Yosemite (which OS are you using? I'd like to use this but
can't right now).


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#1 (comment).

Ok. I found this.

https://exelixis.assembla.com/spaces/phylogenetic-likelihood-library/tickets/116-mac-and-pll#/activity/ticket
:

It appears as though the 1.0.0 version is too old for Mac OS X. I've tried
to install the new one from Git and it's kind of annoying. I think Homebrew
automates this using:

brew tap homebrew/homebrew-science

brew install --HEAD libpll

On Mon, Nov 10, 2014 at 6:49 PM, Alex Safatli safatli@cs.dal.ca wrote:

I just replicated this on my Mac desktop running Yosemite. I had not tried
to install it on Mac OS X, since I built it all in Linux, but I figured it
would still work. My mistake, apparently. It appears to be a libpll issue,
definitely, where it is expecting to find the memalign() function which is
apparently not present in Mac OS X. So much for libpll intending to be
multi-platform. I'm using 1.0.0 for libpll (the version and source present
on the main website). I don't know how to fix this just yet, but I'll look
around.

On Mon, Nov 10, 2014 at 6:46 PM, Austin Richardson <
notifications@github.com> wrote:

Which version of libpll are you using?

On Nov 10, 2014, at 5:06 PM, Alex Safatli notifications@github.com
wrote:

Checking for you right now. Don't think I've seen this error yet, but
it
definitely appears to be a problem with libpll.

On Mon, Nov 10, 2014 at 5:02 PM, Austin Richardson <
notifications@github.com

wrote:

TraceBack:


ImportError Traceback (most recent call last)
in ()
1 from pylogeny.alignment import alignment
----> 2 from pylogeny.landscape import landscape
3 from pylogeny.heuristic import parsimonyGreedy
4
5 ali = alignment('yourAlignment.fasta')

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/landscape.py
in ()
7 import networkx
8 from random import choice
----> 9 from scoring import getParsimonyFromProfiles as parsimony,
getLogLikelihood as ll
10 from parsimony import profile_set as profiles
11 from bipartition import bipartition

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/scoring.py
in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 import pll, parsimony, fitch, p4
8 try:
9 from model import DiscreteStateModel as State

/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylogeny/pll.py
in ()
5 # E-mail: safatli@cs.dal.ca
6
----> 7 from pylibpll import *
8 from tempfile import NamedTemporaryFile as NTempFile
9 import os

ImportError:
dlopen(/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylogeny-0.2.3-py2.7-macosx-10.9-x86_64.egg/pylibpll.so,
2): Symbol not found: _memalign
Referenced from: /usr/local/lib/libpll-generic.1.dylib
Expected in: flat namespace
in /usr/local/lib/libpll-generic.1.dylib

Result of pip freeze:

DendroPy==3.12.2
bitarray==0.8.1
networkx==1.9.1
numpy==1.9.0
p4==0.92.-2014.10.30-
pandas==0.14.1

Using libpll 1.0.0

On Mac OS X Yosemite (which OS are you using? I'd like to use this
but
can't right now).


Reply to this email directly or view it on GitHub
#1.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#1 (comment).

I have a better understanding of the issue now. It definitely appears to be exclusive to the "stable" version of libpll (1.0.0) and updating to the newest version from source will not help as they appeared to have severely changed their API.

In this regard, I will need to make some changes to my extension in order to use the newest version. I think I will be looking to include pypll as this appears to be a new addition to the Python Package Index and makes use of the newest version of libpll.

I shall fix this in the near future.

By the way, for now you can use the BEAGLE library scoring method I have in scoring.py if you need likelihood and you have nucleotide data (does not currently work for amino acid data) and just comment out the pylibpll import, but to do this you'll need to edit the source files.

audy commented

I'm using 1.0.0 for libpll (the version and source present
on the main website).

I thought you were also using libpll v1.0.0 which seems to be the latest.

Since we're both using 1.0.0, shouldn't the API be the same? Or did the authors change the API without updating the version?

No, I am using 1.0.0. The newer version on their Git repository appears to
have a drastically changed API, but seems to have the only working shared
library for Mac OS X as the stable 1.0.0 version seems to presuppose
memalign() which is not present in the C headers for Mac OS X. So, this is
the crux of my problem: to make my software function in Mac OS X, it looks
like I may have to update my code for the new API on their Git repository.
Does that make sense?

On Wed, Nov 12, 2014 at 10:55 AM, Austin Richardson <
notifications@github.com> wrote:

I'm using 1.0.0 for libpll (the version and source present
on the main website).

I thought you were also using libpll v1.0.0 which seems to be the latest.

Since we're both using 1.0.0, shouldn't the API be the same? Or did the
authors change the API without updating the version?


Reply to this email directly or view it on GitHub
#1 (comment).

audy commented

Yes that makes sense. I can run on linux for now.

Updated to the newest version of libpll, so this may be resolved now. I'll have to check it out on Yosemite, but if you could, that would be great as well.