ImSwitch Installation Guide
This should give you a quick start on installing imswitch. Let’s use this thread to update this document over time and chase issues in terms of compatibility.
Installation Methods
Recommended Method: Using pip
-
Install Mamba or Conda. If you use Conda, replace
mamba
withconda
in the commands below. -
To install the latest version of ImSwitch, use one of the following commands:
pip install https://github.com/openUC2/ImSwitch/archive/refs/heads/master.zip # or pip install ImSwitchUC2 # Note: This may be outdated
HINT: You can use these commands also to update it.
- If you plan to edit and modify ImSwitch, consider forking the
openUC2/imswitch
repository and working from your fork, or cloning the repository directly.
Creating Your Environment
-
Create and activate your environment:
mamba create -n imswitchhackathon python=3.9 -y mamba activate imswitchhackathon cd ~/Downloads git clone https://github.com/openUC2/imswitch cd imswitch
Installation for ARM64-based Macs (Recommended Method)
-
Install dependencies and ImSwitch:
pip install -r requirements-arm64.txt pip install -e . --no-deps python -m pip install pyqtgraph qdarkstyle
Alternative Installation Method (Not Recommended)
-
Install dependencies and ImSwitch using Conda:
conda install -c conda-forge napari pyqt -y python -m pip install https://gitlab.com/bionanoimaging/nanoimagingpack/-/archive/master/nanoimagingpack-master.zip python -m pip install -e . python -m pip install pyqtgraph qdarkstyle
Installation for Other Systems
-
Install dependencies and ImSwitch:
pip install -r requirements.txt python -m pip install -e . --no-deps
Troubleshooting
-
If you encounter issues, try reinstalling PyQt5:
pip install pyqt5 --force-reinstall
Launching ImSwitch
-
Run the following command to launch ImSwitch:
python -m imswitch
-
Choose “Virtual Microscope” as the configuration.