Installing under VS Code
You will need to do the following to install the extension:
Download and install VS Code
Install BioNetGen extension for VS Code
Download and install Anaconda python
(Windows users only) Install Perl
.bnglfile in VS Code
First, download and install VS Code. The suggested way to install this VS Code extension is
from the VS Code marketplace. Simply open the Extensions tab (or press
CTRL/CMD + SHIFT + X) after opening VS Code and search
for BioNetGen. This package will show up, click install. If
this step doesn’t work, please make sure you have the latest version.
Next, you will need Python installed, and you need to have your terminal environment set correctly. We recommend
Anaconda Python. Download and install Anaconda Python.
During the installation, we recommend adding Anaconda to your PATH environment variable when given the option.
In VS Code, open a new terminal (
CTRL/CMD + ` or under
Terminal -> New Terminal) and test if you have access to Python package manager
pip (by running
pip -h, for example).
If you don’t, you need to setup your environment so that the terminal has access to
pip; this is OS dependent and there are various
guides you can find online.
Windows users should also install Perl at this point if not already installed. You can use
conda install -c conda-forge perl to do this.
If you do not wish to use Anaconda, or if you do not wish to install Perl through Anaconda, we suggest Strawberry Perl.
Finally, open a
.bngl file in VS Code; this should check if PyBioNetGen is installed, and will automatically install it if not. Once complete, make sure it’s installed correctly by
bionetgen -h. If this doesn’t work, you can open the command palette (
CTRL/CMD + SHIFT + P) and run the
BNG setup command.
Alternatively, you can open a terminal and run the install command (
pip install bionetgen) yourself.
Additional Setup Advice
You may need to specify which installation of Python that VS Code uses.
To do so, open the command palette (
CTRL/CMD + SHIFT + P) and select the command
Python: Select Interpreter, which will allow you to make your selection.