This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How import the module "nb" - FEnics on Ubuntu 14.04

0 votes

Hello all,

I have a trouble to use the module "nb" for a better visualisation of the FEnics results. Although the module "nb" is installed with "pip install nb", FEnics doesn't regconize it. Below is the output on the screen

Traceback (most recent call last):
File "petra.py", line 9, in
import nb
ImportError: No module named nb
Aborted (core dumped)

Could you please show me how to overcome this issue? Would python 3.4 be used instead of python 2.7 as the default version for FEnics on Ubuntu 14.04?

Thanks a lot in advance, I look forward to hearing from you.

Sincerely,
An Danh Nguyen

asked Oct 9, 2016 by andanh FEniCS Novice (160 points)

1 Answer

+2 votes
 
Best answer

Hi An,

I believe that you are looking for the nb.py module of hIPPYlib (Inverse Problem PYthon library, hippylib.github.io).

It is located in tutorial/nb.py

This small module was written for FEniCS 1.6 and previous version that do not have native support for plotting inside notebooks.

Best,

Umberto

answered Oct 13, 2016 by umberto FEniCS User (6,440 points)
selected Oct 14, 2016 by andanh

Thanks a lot for the help, Umberto.

...