Discussion:
[Pyublas] Problems installing PyUblas
Gabriele Brambilla
2015-10-09 16:05:38 UTC
Permalink
Hi all,

I tried to install PyUblas via pip install but I received an error.

I have a Mac and I am using Anaconda for Python

I tried manually doing:

1 11:31 setenv CPPFLAGS "-I/opt/local/include"
2 11:31 setenv LDFLAGS "-L/opt/local/lib"
3 11:31 cd /tmp
4 11:31 tar zxf ~/Downloads/PyUblas-2013.1.tar.gz
5 11:31 cd PyUblas-2013.1/
6 11:32 ./configure.py
7 11:32 vi siteconf.py

The siteconf.py edit was changing
BOOST_PYTHON_LIBNAME = ['boost_python']
to
BOOST_PYTHON_LIBNAME = ['boost_python-mt']

8 11:32 python setup.py install

the install complete, but when I try to import pyublas I got this error:
but "import pyublas" fails with:

[gs66-stumbras:~] gbrambil% python
Python 2.7.6 (default, Dec 12 2014, 14:02:59)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
import pyublas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/__init__.py",
line 2, in <module>
import pyublas._internal
ImportError:
dlopen(/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so,
2): Symbol not found: __ZNSoD0Ev
Referenced from:
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Expected in: dynamic lookup
Confirming missing symbol:
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
| grep __ZNSoD0Ev
U __ZNSoD0Ev

Do you know what the problem is?

Thanks

Gabriele
Andreas Kloeckner
2015-10-09 16:28:01 UTC
Permalink
Post by Gabriele Brambilla
Hi all,
I tried to install PyUblas via pip install but I received an error.
I have a Mac and I am using Anaconda for Python
1 11:31 setenv CPPFLAGS "-I/opt/local/include"
2 11:31 setenv LDFLAGS "-L/opt/local/lib"
3 11:31 cd /tmp
4 11:31 tar zxf ~/Downloads/PyUblas-2013.1.tar.gz
5 11:31 cd PyUblas-2013.1/
6 11:32 ./configure.py
7 11:32 vi siteconf.py
The siteconf.py edit was changing
BOOST_PYTHON_LIBNAME = ['boost_python']
to
BOOST_PYTHON_LIBNAME = ['boost_python-mt']
8 11:32 python setup.py install
[gs66-stumbras:~] gbrambil% python
Python 2.7.6 (default, Dec 12 2014, 14:02:59)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
Post by Gabriele Brambilla
import pyublas
File "<stdin>", line 1, in <module>
File
"/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/__init__.py",
line 2, in <module>
import pyublas._internal
dlopen(/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so,
2): Symbol not found: __ZNSoD0Ev
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Expected in: dynamic lookup
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Do you know what the problem is?
This might be a mismatch in C++ ABIs... but I'm not sure. It's likely
that this is a C++ symbol that's not being found--which you could
confirm by running

c++filt __ZNSoD0Ev

One possible reason is that you used a different compiler for Boost than
PyUblas? Not sure though.

HTH,
Andreas
Gabriele Brambilla
2015-10-09 16:32:19 UTC
Permalink
when I do that I get

[gs66-stumbras:~] gbrambil% c++filt __ZNSoD0Ev
std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()

Generally the symbol looked undefined

[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
| grep __ZNSoD0Ev
U __ZNSoD0Ev

Thanks

Gabriele
Post by Gabriele Brambilla
Post by Gabriele Brambilla
Hi all,
I tried to install PyUblas via pip install but I received an error.
I have a Mac and I am using Anaconda for Python
1 11:31 setenv CPPFLAGS "-I/opt/local/include"
2 11:31 setenv LDFLAGS "-L/opt/local/lib"
3 11:31 cd /tmp
4 11:31 tar zxf ~/Downloads/PyUblas-2013.1.tar.gz
5 11:31 cd PyUblas-2013.1/
6 11:32 ./configure.py
7 11:32 vi siteconf.py
The siteconf.py edit was changing
BOOST_PYTHON_LIBNAME = ['boost_python']
to
BOOST_PYTHON_LIBNAME = ['boost_python-mt']
8 11:32 python setup.py install
[gs66-stumbras:~] gbrambil% python
Python 2.7.6 (default, Dec 12 2014, 14:02:59)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
Post by Gabriele Brambilla
import pyublas
File "<stdin>", line 1, in <module>
File
"/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/__init__.py",
Post by Gabriele Brambilla
line 2, in <module>
import pyublas._internal
dlopen(/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so,
Post by Gabriele Brambilla
2): Symbol not found: __ZNSoD0Ev
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Post by Gabriele Brambilla
Expected in: dynamic lookup
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Post by Gabriele Brambilla
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Do you know what the problem is?
This might be a mismatch in C++ ABIs... but I'm not sure. It's likely
that this is a C++ symbol that's not being found--which you could
confirm by running
c++filt __ZNSoD0Ev
One possible reason is that you used a different compiler for Boost than
PyUblas? Not sure though.
HTH,
Andreas
Gabriele Brambilla
2015-10-09 16:34:23 UTC
Permalink
I was also wondering why these libraries have different names

The siteconf.py edit was changing
BOOST_PYTHON_LIBNAME = ['boost_python']
to
BOOST_PYTHON_LIBNAME = ['boost_python-mt']


I did it because I didn't have boost-python without the '-mt'

Thanks

Gabriele

On Fri, Oct 9, 2015 at 6:32 PM, Gabriele Brambilla <
Post by Gabriele Brambilla
when I do that I get
[gs66-stumbras:~] gbrambil% c++filt __ZNSoD0Ev
std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()
Generally the symbol looked undefined
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Thanks
Gabriele
Post by Gabriele Brambilla
Post by Gabriele Brambilla
Hi all,
I tried to install PyUblas via pip install but I received an error.
I have a Mac and I am using Anaconda for Python
1 11:31 setenv CPPFLAGS "-I/opt/local/include"
2 11:31 setenv LDFLAGS "-L/opt/local/lib"
3 11:31 cd /tmp
4 11:31 tar zxf ~/Downloads/PyUblas-2013.1.tar.gz
5 11:31 cd PyUblas-2013.1/
6 11:32 ./configure.py
7 11:32 vi siteconf.py
The siteconf.py edit was changing
BOOST_PYTHON_LIBNAME = ['boost_python']
to
BOOST_PYTHON_LIBNAME = ['boost_python-mt']
8 11:32 python setup.py install
[gs66-stumbras:~] gbrambil% python
Python 2.7.6 (default, Dec 12 2014, 14:02:59)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
Post by Gabriele Brambilla
import pyublas
File "<stdin>", line 1, in <module>
File
"/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/__init__.py",
Post by Gabriele Brambilla
line 2, in <module>
import pyublas._internal
dlopen(/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so,
Post by Gabriele Brambilla
2): Symbol not found: __ZNSoD0Ev
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Post by Gabriele Brambilla
Expected in: dynamic lookup
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Post by Gabriele Brambilla
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Do you know what the problem is?
This might be a mismatch in C++ ABIs... but I'm not sure. It's likely
that this is a C++ symbol that's not being found--which you could
confirm by running
c++filt __ZNSoD0Ev
One possible reason is that you used a different compiler for Boost than
PyUblas? Not sure though.
HTH,
Andreas
Andreas Kloeckner
2015-10-09 16:56:27 UTC
Permalink
Post by Gabriele Brambilla
when I do that I get
[gs66-stumbras:~] gbrambil% c++filt __ZNSoD0Ev
std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()
Generally the symbol looked undefined
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Right--but it's clearly a C++ standard library thing (being one of the
C++ standard I/O functions), so you might be missing some standard
C++ libraries in your build. Maybe add them to your LDFLAGS?

Andreas
Gabriele Brambilla
2015-10-15 17:10:28 UTC
Permalink
Hi Andreas,

sorry for the late reply. Which one should I try to include?

Thanks

GB
Post by Gabriele Brambilla
Post by Gabriele Brambilla
when I do that I get
[gs66-stumbras:~] gbrambil% c++filt __ZNSoD0Ev
std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()
Generally the symbol looked undefined
[gs66-stumbras:~] gbrambil% nm
/Users/gbrambil/anaconda/lib/python2.7/site-packages/PyUblas-2013.1-py2.7-macosx-10.5-x86_64.egg/pyublas/_internal.so
Post by Gabriele Brambilla
| grep __ZNSoD0Ev
U __ZNSoD0Ev
Right--but it's clearly a C++ standard library thing (being one of the
C++ standard I/O functions), so you might be missing some standard
C++ libraries in your build. Maybe add them to your LDFLAGS?
Andreas
Loading...