Support
If you are stuck with a problem using Brian, please do get in touch at our community forum.
You can save time by following this procedure when reporting a problem:
Do try to solve the problem on your own first. Read the documentation, including using the search feature, index and reference documentation.
Search the mailing list archives to see if someone else already had the same problem.
Before writing, try to create a minimal example that reproduces the problem. You’ll get the fastest response if you can send just a handful of lines of code that show what isn’t working.
Which version of Brian am I using?
When reporting problems, it is important to include the information what exact version
of Brian you are using. The different install methods listed in Installation provide
different mechanisms to get this information. For example, if you used conda
for
installing Brian, you can use conda list brian2
; if you used pip
, you can use
pip show brian2
.
A general method that works independent of the installation method is to ask the Brian package itself:
>>> import brian2
>>> print(brian2.__version__)
2.4.2
This method also has the advantage that you can easily call it from the same environment
(e.g. an IDE or a Jupyter Notebook) that you use when you execute Brian scripts. This
helps avoiding mistakes where you think you use a specific version but in fact you use a
different one. In such cases, it can also be helpful to look at Brian’s __file__
attribute:
>>> print(brian2.__file__)
/home/marcel/anaconda3/envs/brian2_test/lib/python3.9/site-packages/brian2/__init__.py
In the above example, it shows that the brian2
installation in the conda environment
brian2_test
is used.
If you installed a development version of Brian, then the version number will contain additional information:
>>> print(brian2.__version__)
2.4.2.post408
The above means that the Brian version that is used has 408 additional commits that were added after the 2.4.2 release.