Skip to content

Commit

Permalink
Merge pull request #1434 from flatironinstitute/dev-windows_pip
Browse files Browse the repository at this point in the history
Windows users: use pip and compile it
  • Loading branch information
pgunn authored Dec 11, 2024
2 parents bd9ce41 + c80447d commit 2cb4b1b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
environment-file: environment-minimal.yml
activate-environment: caiman
conda-solver: libmamba
miniforge-version: latest

- name: Install OS Dependencies
shell: bash -l {0}
run: |
sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx
sudo apt-get update && sudo apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx
- name: Install Dependencies
shell: bash -l {0}
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,36 @@ A Python toolbox for large-scale **Ca**lcium **Im**aging **An**alysis.
CaImAn implements a set of essential methods required to analyze calcium and voltage imaging data. It provides fast and scalable algorithms for motion correction, source extraction, spike deconvolution, and registering neurons across multiple sessions. It is suitable for both two-photon and one-photon fluorescence microscopy data, and can be run in both offline and online modes. Documentation is [here](https://caiman.readthedocs.io/en/latest/).

# Quick start
Follow these three steps to get started quickly, from installation to working through a demo notebook. If you do not already have conda installed, [you can find it here](https://github.com/conda-forge/miniforge). The miniforge distribution of conda is preferred; it will require fewer steps and likely encounter fewer issues. There is a video walkthrough of the following steps [here](https://youtu.be/b63zAmKihIY?si=m7WleTwdU0rJup_2).
Follow these three steps to get started quickly, from installation to working through a demo notebook. If you do not already have conda installed, [you can find it here](https://github.com/conda-forge/miniforge). The miniforge distribution of conda is preferred; it will require fewer steps and likely encounter fewer issues. There is a video walkthrough of the following steps [here](https://youtu.be/b63zAmKihIY?si=m7WleTwdU0rJup_2). If you are using a different distro of conda, you will likely need to add `-c conda-forge` to the commands you use to make your environment.

Windows users will temporarily need to use an alternative install path.

### Step 1: Install caiman
The following is all done in your anaconda prompt, starting in your base environment:

mamba create -n caiman caiman # build a caiman environment
conda activate caiman # activate the environment

### Step 1: Install caiman (alternative for Windows users)
Windows users will need to follow an alternative set of steps because tensorflow does not have good packaging for Windows with conda (packaging changes are underway to solve this but are not available as of this writing).

First, you will need to install Visual Studio 2019 or possibly a later version, with the C++ compiler and commandline utilities.
Then you will clone this repo to your windows system, and enter the checkout directory.

Next, you will build and activate a mostly-empty conda environment:

mamba create -n caiman python=3.11 pip vs2019_win-64
conda activate caiman

Finally, you will use pip to install caiman's prerequisites and caiman itself:
pip install .

This step may fail if the compiler is not correctly installed and is the most fragile part of this install route; reach out if you encounter issues.

After this, assuming you succeed, leave the source directory. Later steps will not function correctly when run in the source/checkout directory.

### Step 2: Download code samples and data sets
Create a working directory called `caiman_data` that includes code samples and related data. Run the following command from the same virtual environment that you created in Step 1:
Create a working directory called `caiman_data` that includes code samples and related data. Run the following command from the same conda environment that you created in Step 1:

caimanmanager install

Expand Down

0 comments on commit 2cb4b1b

Please sign in to comment.