Topics

not able to install dionysus on ubuntu 14.04

indragt@...
 

Hi All, 
I am trying to install dionysus but its getting crazy. I am using http://www.mrzv.org/software/dionysus/get-build-install.html and everything build successfully but still when I issue "import dionysis" I get an error that no module named dionysus. I thought its an issue with pythonpath but when I set that correctly or run python from .../Dionysus/bindings/python, I get 
    from    _dionysus   import *
ImportError: No module named _dionysus
I was able to install dionysus on another ubuntu 16.04 machine by using instructions at http://www.mrzv.org/software/dionysus2/ and there its working fine but not able to so in the 14.04 machine. I ended up getting errors like this: 

  Removing source in /tmp/pip-IjDYZh-build
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-IjDYZh-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mR2CcN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-IjDYZh-build/
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-IjDYZh-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mR2CcN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-IjDYZh-build/
indrajeet@indrajeet:~$ sudo pip install --verbose git+https://github.com/mrzv/dionysus.git^C

There are many more msgs that I dont understand. for example, somewhere in the middle I get
oat> > >, true>::order, boost::mpl::vector0<mpl_::na>, 0> >}’ has no member named ‘emplace_back’
             void                emplace_back(Args&&... args)                        { cells_.template get<order>().emplace_back(std::forward<Args>(args)...); }
                                                                                       ^
    /tmp/pip-IjDYZh-build/include/dionysus/filtration.h: In instantiation of ‘void dionysus::Filtration<Cell_, CellLookupIndex_, checked_index>::emplace_back(Args&& ...) [with Args = {const std::vector<int, std::allocator<int> >&, const float&}; Cell_ = dionysus::Simplex<int, float>; CellLookupIndex_ = boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >; bool checked_index = true]’:
    /tmp/pip-IjDYZh-build/bindings/python/filtration.cpp:25:77:   required from here
    /tmp/pip-IjDYZh-build/include/dionysus/filtration.h:71:83: error: ‘boost::multi_index::multi_index_container<dionysus::Simplex<int, float>, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, boost::multi_index::random_access<boost::multi_index::tag<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<dionysus::Simplex<int, float> > >::index<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order>::type {aka class boost::multi_index::detail::random_access_index<boost::multi_index::detail::nth_layer<2, dionysus::Simplex<int, float>, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, boost::multi_index::random_access<boost::multi_index::tag<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<dionysus::Simplex<int, float> > >, boost::mpl::v_item<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, boost::mpl::vector0<mpl_::na>, 0> >}’ has no member named ‘emplace_back’
 
I would really appreciate any help regarding this. If need be I will paste the full log. 
Thanks, 
Indrajeet

Dmitriy Morozov
 

Hi Indrajeet,

First of all, I suggest you stick to Dionysus 2. Getting Dionysus 1 to build is a major headache these days. You have to get your versions of Python and Boost.Python to match exactly, which is typically too much trouble.

With Dionysus 2, I think you running into this issue: https://github.com/mrzv/dionysus/issues/2

There are two problems. Your Boost is probably 1.54 and thus too old. You need at least 1.55. And your compiler is probably GCC 4.8.x, which has some bugs. The oldest compiler that will work for Dionysus 2 is GCC 5.4.0. I don't know how to update these on Ubuntu, but there must be a way. Once you do, hopefully the problems will go away.

There is one more trick you could try. You could install a conda distribution of Python. Then you can install a binary Dionysus 2 package via

  conda install -c conda-forge dionysus 


Let me know if it works for you.

Best,
Dmitriy


On Tue, Nov 28, 2017 at 6:36 PM, <indragt@...> wrote:
Hi All, 
I am trying to install dionysus but its getting crazy. I am using http://www.mrzv.org/software/dionysus/get-build-install.html and everything build successfully but still when I issue "import dionysis" I get an error that no module named dionysus. I thought its an issue with pythonpath but when I set that correctly or run python from .../Dionysus/bindings/python, I get 
    from    _dionysus   import *
ImportError: No module named _dionysus
I was able to install dionysus on another ubuntu 16.04 machine by using instructions at http://www.mrzv.org/software/dionysus2/ and there its working fine but not able to so in the 14.04 machine. I ended up getting errors like this: 

  Removing source in /tmp/pip-IjDYZh-build
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-IjDYZh-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mR2CcN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-IjDYZh-build/
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-IjDYZh-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mR2CcN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-IjDYZh-build/
indrajeet@indrajeet:~$ sudo pip install --verbose git+https://github.com/mrzv/dionysus.git^C

There are many more msgs that I dont understand. for example, somewhere in the middle I get
oat> > >, true>::order, boost::mpl::vector0<mpl_::na>, 0> >}’ has no member named ‘emplace_back’
             void                emplace_back(Args&&... args)                        { cells_.template get<order>().emplace_back(std::forward<Args>(args)...); }
                                                                                       ^
    /tmp/pip-IjDYZh-build/include/dionysus/filtration.h: In instantiation of ‘void dionysus::Filtration<Cell_, CellLookupIndex_, checked_index>::emplace_back(Args&& ...) [with Args = {const std::vector<int, std::allocator<int> >&, const float&}; Cell_ = dionysus::Simplex<int, float>; CellLookupIndex_ = boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >; bool checked_index = true]’:
    /tmp/pip-IjDYZh-build/bindings/python/filtration.cpp:25:77:   required from here
    /tmp/pip-IjDYZh-build/include/dionysus/filtration.h:71:83: error: ‘boost::multi_index::multi_index_container<dionysus::Simplex<int, float>, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, boost::multi_index::random_access<boost::multi_index::tag<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<dionysus::Simplex<int, float> > >::index<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order>::type {aka class boost::multi_index::detail::random_access_index<boost::multi_index::detail::nth_layer<2, dionysus::Simplex<int, float>, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, boost::multi_index::random_access<boost::multi_index::tag<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<dionysus::Simplex<int, float> > >, boost::mpl::v_item<dionysus::Filtration<dionysus::Simplex<int, float>, boost::multi_index::hashed_unique<boost::multi_index::identity<dionysus::Simplex<int, float> > >, true>::order, boost::mpl::vector0<mpl_::na>, 0> >}’ has no member named ‘emplace_back’
 
I would really appreciate any help regarding this. If need be I will paste the full log. 
Thanks, 
Indrajeet


indragt@...
 

Hi Dmitriy, 
Thanks for your reply. I do have gcc 5.4.1 installed but the version of boost is 1.54. I will try to upgrade it to 1.55 now and let you know if it works.

Thanks,
Indrajeet

indragt@...
 

Hi Dmitriy, 
I could not find a way to install boost1.55 (I assume its same as libboost1.55) along with 1.54 so I had to uninstall 1.54 and install 1.55. That was indeed the problem and after that the installation of dionysus was successful. However, many of my packages (including ROS) that were dependent on libboost1.54 became unstable or stopped working. May be I have messed up with something else while changing to boost1.55 but at least dionysus installation problem has been solved.  I really appreciate your help. 

Indrajeet

Dmitriy Morozov
 

Hi Indrajeet,

Thanks for the update. I unfortunately know nothing about Ubuntu, so I don't have any advice on how to make things work consistently with different versions of Boost. Maybe somebody else on this list knows.

I am glad to hear that dionysus installation was successful.

Best,
Dmitriy

On Wed, Nov 29, 2017 at 11:02 AM, <indragt@...> wrote:
Hi Dmitriy, 
I could not find a way to install boost1.55 (I assume its same as libboost1.55) along with 1.54 so I had to uninstall 1.54 and install 1.55. That was indeed the problem and after that the installation of dionysus was successful. However, many of my packages (including ROS) that were dependent on libboost1.54 became unstable or stopped working. May be I have messed up with something else while changing to boost1.55 but at least dionysus installation problem has been solved.  I really appreciate your help. 

Indrajeet


indragt@...
 

Hi Dmitriy,
Its not a problem. The problem was indeed due to boost. I eventually ended up reinstalling ubuntu 16.04 on my laptop. The dionysus now gets installed properly now. I am using this page: http://www.mrzv.org/software/dionysus2/
There is no problem in installing in any of the method but I am now not able to import any module, I get this error:
indrajeet@indrajeet:~$ python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dionysus
>>> from dionysus import Rips
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Rips
>>> from dionysus import PairwiseDistances
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name PairwiseDistances
>>>

the command "import dionysus" works but others don't. I guess it is something related to finding the correct path. I added the line "export PYTHONPATH= ...build/bindings/python: $PYTHONPATH" IN ~/.bashrc file but its still not working.
Is there anything obvious I am missing?

Thanks,
Indrajeet

Dmitriy Morozov
 

You are following examples from Dionysus 1, not 2.

On Nov 30, 2017 11:53 AM, <indragt@...> wrote:
Hi Dmitriy,
Its not a problem. The problem was indeed due to boost. I eventually ended up reinstalling ubuntu 16.04 on my laptop. The dionysus now gets installed properly now. I am using this page: http://www.mrzv.org/software/dionysus2/
There is no problem in installing in any of the method but I am now not able to import any module, I get this error:
indrajeet@indrajeet:~$ python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dionysus
>>> from dionysus import Rips
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Rips
>>> from dionysus import PairwiseDistances
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name PairwiseDistances
>>>

the command "import dionysus" works but others don't. I guess it is something related to finding the correct path. I added the line "export PYTHONPATH= ...build/bindings/python: $PYTHONPATH" IN ~/.bashrc file but its still not working.
Is there anything obvious I am missing?

Thanks,
Indrajeet

indragt@...
 

Sorry my mistake,  the examples from dionysus 2 are working.

Thanks,
Indrajeet