Installation¶
DendroTweaks is included in the Python package index: https://pypi.org/project/dendrotweaks.
We recommend using a virtual environment to install DendroTweaks. You can create a new virtual environment using
conda
:
conda create -n dendrotweaks python=3.11
Activate the environment:
conda activate dendrotweaks
Install the
dendrotweaks
package and its dependencies:
pip install dendrotweaks
If you are working on Windows, you will need to separately install NEURON according to the official instructions: https://nrn.readthedocs.io/en/8.2.6/install/install_instructions.html#windows
(Alternative) If you want to install the package from source, you can clone the repository and run the following command:
git clone https://github.com/Poirazi-Lab/DendroTweaks.git
cd DendroTweaks
pip install .
Once installed, you can import the package in your Python scripts or Jupyter notebooks:
import dendrotweaks as dd
dd.__version__
If the installation was successful, this command will return the version number of the package.
If you want to use the package in Jupyter notebooks, you will need to install Jupyter:
pip install jupyter
Development¶
If you want to contribute to the development of DendroTweaks, you can install the package in editable mode with the development dependencies. To do this, clone the repository and run the following command:
git clone https://github.com/Poirazi-Lab/DendroTweaks.git
cd DendroTweaks
pip install -e .[dev]
Troubleshooting¶
Debian-based systems (e.g., Ubuntu)¶
If you encounter any issues with compiling MOD files in the NEURON simulator, you could try to manually compile the MOD files. To do this, navigate to a folder containing MOD files, activate your virtual environment, and run the following command:
nrnivmodl
This command will compile the MOD files and result in the following directory structure:
/path/to/mod/
├── mechanism.mod
└── x86_64
└── ...
You should be able to load the mechanisms from the compiled MOD files in Python using the following command:
import neuron
neuron.load_mechanisms('path/to/mod/')
If you encounter any issues with the compilation of the MOD files, you may need to install the C++ compiler and make utility. Make sure you have the following packages installed:
gcc --version
g++ --version
make --version
If you don’t have them installed, you can install them using the following commands:
sudo apt install gcc
sudo apt install g++
sudo apt install make