-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
- (For Windows) Download Python 3.6 from this link if you have a Windows 64 bit machine. Use this link for 32 bit installation.
Note : If the installation fails, make sure that your Windows OS has the lastest updates from Microsoft. You would also need Microsoft Runtime C environment to use Python, that is, have the latest Visual Studio distribution installed on your system. Refer to this [link] for more information.
Python comes preinstalled with macOS and linux. However, if you wish to update to the latest Python release, go to this link.
Note 2: libSBML is still in experimental phase with Python 3.7, so it is recommended that you have Python 3.6. However, for the purposes of using subsbml, it might as well work with 3.7, so if you are already on 3.7 maybe you can give it a try without downgrading to 3.6, but if you are installing afresh then go with 3.6 stable release for Python.
- Add Python to PATH environment variable. An online tutorial to do this in Windows OS is available here.
Note 3: You might need to install Python as a framework for macOS (do this only if you face some problem running Python code). With Anaconda, you would need to install python.app and then use pythonw to run all scripts.
conda install python.app
pythonw filename.py
- Install python-libsbml. Follow steps given on this link. If you have Python PyPI installed and added to environment variables of your machine, then simply running
pip install python-libsbmlshould work and install the latest stable libsbml version.
-
Clone the Github repository of
subsbml. If you havegitinstalled, then simply rungit clone https://github.com/BuildACell/subsbml.gitfrom the directory where you want to installsubsbml. If not, download a zip of the repository using this download link and simply extract to the directory where you want to installsubsbml. -
cdto thesubsbmlinstalled folder from the above step. From this directory, runpip install .orpython setup.py installifpipis not installed. This will install thesubsbmlpackage and add it to the packages path for your Python (in site-packages).
To install all (and some extra, but useful) dependencies, simply run python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose. However, if you prefer to install each dependency separately and only the mandatory ones then install the following
-
numpy- Mandatory. To install runpip install numpy. -
matplotlib- Mandatory. To install runpip install matplotlib. -
ipythonandjupyter- Needed to run the examples ipython notebooks available on Wiki. To install runpip install ipython, andpip install jupyter.
(If you don't have Python PyPI, go to this link for numpy source distributions and other ways to install it on your machine and this link for help with jupyter installation.)
Although, most of subsbml features concern with composing SBML files but it also provides some additional but optional features for simulation of the SBML files. Currently, there are three simulator modes supported and to use any of them you need to install the simulator externally. The following steps will point you towards the required steps:
-
RoadRunner- Deterministic simulations - A fast SBML simulator that has full SBML support. Go to this link to install. -
bioscrape- Deterministic simulations - Go to this link to install. -
bioscrape- Stochastic simulations - Refer to the documentation to learn how to run stochastic simulations usingbioscrape - COPASI (deterministic and stochastic simulations) - Support with
subsbmlcoming soon!
You are now ready to use subsbml! Just write from subsbml import * in whatever Python file you want to use the package features. Head on over to the Wiki/Usage to refer to some common usage examples for the package.
Please feel free to create issues on the Github repository if you face any issues in installation or in using this package. You may also reach out to Prof. Richard Murray for any feedback/suggestions.