2

I use

apt-get install libboost-all-dev

But when I import boost with python3, I get some errors

 In [1]: import boost
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-df3240a4d6cf> in <module>()
----> 1 import boost

/usr/lib/python3/dist-packages/boost/__init__.py in <module>()
      7     sys.setdlopenflags(flags)
      8 else:
----> 9     import mpi
     10

ImportError: No module named 'mpi'

I try to use pip3 to install the module mpi, but it seems that there has no module named mpi.

By the way, boost works well in python2.7.

What should I do?

Philokey
  • 491
  • 2
  • 5
  • 14
  • This may be due to `python`, which is of version 2.7 by default, referred during the compilation of boost. You may have to specify python binary to use during the compilation. See http://stackoverflow.com/questions/5539557/boost-and-python-3-x But i am not sure if you can do this with apt-get. – hitochan Jul 14 '16 at 15:34

0 Answers0