Installation ============ DendroTweaks is included in the Python package index: https://pypi.org/project/dendrotweaks. 1. We recommend using a virtual environment to install DendroTweaks. You can create a new virtual environment using :code:`conda`: .. code-block:: bash conda create -n dendrotweaks python=3.11 2. Activate the environment: .. code-block:: bash conda activate dendrotweaks 3. Install the :code:`dendrotweaks` package and its dependencies: .. code-block:: bash 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 3. (Alternative) If you want to install the package from source, you can clone the repository and run the following command: .. code-block:: bash git clone https://github.com/Poirazi-Lab/DendroTweaks.git cd DendroTweaks pip install . 4. Once installed, you can import the package in your Python scripts or Jupyter notebooks: .. code-block:: python 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: .. code-block:: bash 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: .. code-block:: bash 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: .. code-block:: bash nrnivmodl This command will compile the MOD files and result in the following directory structure: .. code-block:: bash /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: .. code-block:: python 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: .. code-block:: bash gcc --version g++ --version make --version If you don't have them installed, you can install them using the following commands: .. code-block:: bash sudo apt install gcc sudo apt install g++ sudo apt install make