Anaconda and BornAgain setup

Check that python is working from command line:

python -c "print('hello, world!')

or in a jupyter notebook:


In [6]:
print('hello, world!')


hello, world!

Check that the bornagain python module is correctly installed:


In [5]:
from __future__ import print_function #needed for python2/python3 compatibility

try:
    import bornagain as ba
    print("successfully loaded bornagain module")
    major, minor = ba.major_version_number, ba.minor_version_number
    print("BornAgain version number is {0}.{1}".format(major, minor))
except:
    print("could not import bornagain module!")


successfully loaded bornagain module
BornAgain version number is 1.6

You should do this for all environments in which you plan to use BornAgain, e.g. jupyter notebook, PyCharm, command line.


In [ ]: