Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
- Install using Pip
- Setting up a Python virtual environment
Install using Pip
Important: You need to have Python 3 and NEURON installed in your system before executing these steps. To install Python go to the official Python web or the Anaconda Distribution web. To install NEURON see instructions.
If you would like to setup a Python virtual environment (useful if you already have a different version of some of the libraries installed in your system and you want to avoid conflicts) jump here before installing NetPyNE UI.
To install NetPyNE-UI through pip run from your terminal:
pip install netpyne_ui jupyter nbextension enable --py jupyter_geppetto jupyter serverextension enable --py jupyter_geppetto jupyter nbextension enable --py widgetsnbextension
The first line will download and install NetPyNE-UI while the next three lines will enable it. In the near future these additional three instructions will not be necessary. Once all the four instructions have executed without errors you can use NetPyNE-UI simply running
NetPyNE-UI from your designated NetPyNE workspace folder.
The workspace folder is any folder on your disk where you would like NetPyNE to create various files including the log and the python notebooks. If you would like to use a default workspace with some ready to import models you can clone https://github.com/Neurosim-lab/netpyne_workspace.
mkdir netpyne_workspace OR git clone https://github.com/Neurosim-lab/netpyne_workspace cd netpyne_workspace NetPyNE-UI
Any model you will export from NetPyNE-UI will end up in this folder. Similarly you will have to put in the workspace folder any model you would like to import into NetPyNE-UI.
NetPyNE-UI command will open your default browser at the URL
http://localhost:8888/geppetto (on some Windows systems
http://192.168.99.100:8888/geppetto) from where you will be able to use NetPyNE-UI.
Given NetPyNE-UI is still in development and this is just a preview alpha release you might encounter some problems, if that's the case please open an issue on this repo!
Setting up a Python virtual environment
Prepare the virtual environment
To make easier the installation you can use the python virtual environment to have a clean environment without issues related to different dependencies, etc.
First of all we need to install the virtualenv, we assume you have python 2.7 and pip already installed, so in order to install virtual we need to run from the terminal:
pip install virtualenv
Once the virtualenv utility has been installed we can proceed to created our virtual environment:
cd ~ mkdir netpyne-ui cd netpyne-ui virtualenv -p python2.7 ./ source bin/activate
Install NEURON in the virtual environment
In the next step we will download and compile NEURON from the source and once done this will be added to the virtual environment.
To download and compile NEURON we can follow these instructions.
Once the sources have been compiled we can copy the folder nrn, created during the instructions linked, inside our bin folder in the virtual environment and then run the python installation. Note, this procedure has to happen in the same terminal where you activated your virtual environment, to be sure you can run the command "which python" and check that the python interpreter is the one contained into your virtual environment.
cp -R nrn ~/netpyne-ui/bin/ cd ~/netpyne-ui/bin/nrn/src/nrnpython python setup.py install
Once the python installation will be completed you should have NEURON installed in your virtual environment, at this point you can continue with the pip installation of NetPyNe-UI with the steps below.