Finally, if you would like to install the necessary requirements locally, we suggest using Mamba:
- If you do not have any pre-existing conda installation, install Mamba and use mambaforge.
- In case you have a pre-existing conda installation, you can install Mamba by either:
- Using the recommended way to install Mamba from mambaforge. This will not invalidate your conda installation, but possibly your pre-existing conda envs will be in a different location (e.g.
/Users/USER_NAME/opt/anaconda3/envs/) then the new mamba envs (e.g./Users/USER_NAME/mambaforge/envs/). You can verify this by runningconda env list. The addition ofexport CONDA_ENVS_PATH=/Users/user/opt/anaconda3/envs/into your.bashprofileor.zprofilefile will fix this. - Use the Existing conda install way, i.e. run
conda install mamba -n base -c conda-forgewhilst in the base environment. This way can take much longer time than the recommended way described above, and might not lead to a successful installation, especially if run on arm64 (Apple Silicon) OS X.
- Using the recommended way to install Mamba from mambaforge. This will not invalidate your conda installation, but possibly your pre-existing conda envs will be in a different location (e.g.
To avoid conflict with used packages, we have prepared several environments:
Day_5/environment_basic.yml, Day_5/environment_cellpose.yml, Day_5/environment_conversion.yml, Day_5/environment_minio.yml and Day_5/environment_cp.yml.
Create the environments. For this, first run the commands below as written, then replace Day_5/environment_conversion.yml motives with Day_5/environment_cellpose.yml, Day_5/environment_basic.yml, Day_5/environment_cp.yml or Day_5/environment_minio.yml and run again to create the other envs.
For Windows, OS X x86_64 (NOT arm64 Apple Silicon), Linux:
$ git clone https://github.com/ome/EMBL-EBI-imaging-course-04-2024
$ cd EMBL-EBI-imaging-course-04-2024
$ mamba env create -f Day_5/environment_conversion.yml
For OS X arm64 Apple Silicon
$ git clone https://github.com/ome/EMBL-EBI-imaging-course-04-2024
$ cd EMBL-EBI-imaging-course-04-2024
$ CONDA_SUBDIR=osx-64 mamba env create -f Day_5/environment_conversion.yml
and activate the newly created environment:
$ conda activate imaging_course_conversion_day5_2024
Before creating a new environment, remember to deactivate the current one:
$ conda deactivate
See also Conda command reference.
The following steps are only required if you want to run the notebooks.
- If you have Anaconda installed:
- Start Jupyter from the Anaconda-navigator
- In the conda environment, run
mamba install ipykernel(for OS X Apple SiliconCONDA_SUBDIR=osx-64 mamba install ipykernel) - To register the environment, run
python -m ipykernel install --user --name imaging_course_conversion_day5_2024 - Select the notebook you wish to run and select the
Kernel>Change kernel>Python [conda env:imaging_course_conversion_day5_2024]orKernel>Change kernel>imaging_course_conversion_day5_2024
- If Anaconda is not installed:
- Add the virtualenv as a jupyter kernel i.e.
ipython kernel install --name "imaging_course_conversion_day5_2024" --user - Open jupyter notebook i.e.
jupyter notebookand select theimaging_course_conversion_day5_2024kernel or[conda env:imaging_course_conversion_day5_2024]according to what is available.
- Add the virtualenv as a jupyter kernel i.e.
To stop the notebook server, in the terminal where te server is running, press Ctrl C. The following question will be asked in the terminal Shutdown this notebook server (y/[n])?. Enter the desired choice.