Skip to content

Installation

Michael Chirillo edited this page Feb 13, 2024 · 8 revisions

PyReconstruct can be installed on just about any major operating system. We recommend installing PyReconstruct into a virtual environment managed by Conda, and this page walks you through that process.

PyReconstruct is undergoing heavy development at the time of writing this guide, and these instructions will likely change over time. Please let us know if you have any questions or if something isn't working as expected.

Table of Contents

  1. Install with Conda
  2. Launch PyReconstruct
  3. Update PyReconstruct
  4. Uninstall PyReconstruct
  5. Development version

Install with Conda

Installing PyReconstruct with the Conda package manager is convenient, and you won't need to deal with installing dependencies.

1. Install Conda

If you do not already have Conda on your machine, follow the install instructions on their website. We suggest installing Miniconda, a slimmed down version of the Conda package manager, and selecting the default options during the installation process.

2. Open a terminal

  • Windows: Click START and search for Anaconda prompt

  • macOS/Linux: Search for terminal.

You should see (base) appear before the terminal prompt, indicating that the base Conda environment is active. (Please refer back to the Conda website on how to initialize Conda if you do not see (base) before your prompt.)

Note for macOS/Linux users

You may not want the base environment automatically activated when opening a terminal, as this can, in some cases, cause problems. To change the default behavior, simply run the following command:

conda config --set auto_activate_base false

You can subsequently activate the base environment by running conda activate.

3. Create a virtual environment

Create a new virtual environment named "harris" that includes Python 3.11 and git by running the following command:

conda create -n harris python=3.11 git

If you already have git, you can remove it from the above command.

Note: You can name the virtual environment anything you'd like; however, be sure to change its name the commands that follow.

4. Activate the virtual environment

Active the virtual environment by running the following command:

conda activate harris

(base) should now be changed to (harris), indicating the virtual environment is now active in your current terminal.

5. Install PyReconstruct

Install PyReconstruct into the virtual environment by running the following command:

pip install git+https://github.com/synapseweb/pyreconstruct

(Note: If you get an error warning you that pip is not installed, install it by running the following command: conda install pip. Then try pip installing PyReconstruct again using the above command.)

Launch PyReconstruct

With the virtual environment active (see install instructions on how to activate the virtual environment with Conda), launch PyReconstruct by running the following command:

PyReconstruct

(Note the first time launching PyReconstruct might take up to a minute depending on your system. Subsequently launching the application should be quicker.)

Update PyReconstruct

To update PyReconstruct, make sure the virtual environment is activated and run the following command:

PyReconstruct --update

Uninstall PyReconstruct

Uninstalling PyReconstruct is as easy as deleting the virtual environment from your machine.

If you installed PyReconstruct with Conda, delete the virtual environment named harris using the following command:

conda remove -n harris --all

Remember to substitute the proper name for the virtual environment if it is something other than harris.

(If you would like to completely uninstall Conda from your machine, please follow the uninstall instructions on the Conda website.)

Development version

Please refer to this wiki page to install a developer's version of PyReconstruct, complete with Neuroglancer and scripts for exporting groups to labels.