From 7ab484cb1d8ec5152ac5e942929a4d826d246f5a Mon Sep 17 00:00:00 2001
From: David Perez-Suarez
Date: Fri, 6 Sep 2024 15:26:11 +0100
Subject: [PATCH 1/3] Replaces anaconda python installation with miniforge
Adds a basic python environment
---
_includes/install_instructions/python.html | 84 ++++++++++++++++------
data/swc_environment.yml | 9 +++
2 files changed, 72 insertions(+), 21 deletions(-)
create mode 100644 data/swc_environment.yml
diff --git a/_includes/install_instructions/python.html b/_includes/install_instructions/python.html
index dd7e5e26..2abb996d 100644
--- a/_includes/install_instructions/python.html
+++ b/_includes/install_instructions/python.html
@@ -13,7 +13,7 @@ Python
research computing, and great for general-purpose programming as
well. Installing all of its research packages individually can be
a bit difficult, so we recommend
- Anaconda,
+ Conda-forge,
an all-in-one installer.
@@ -30,7 +30,7 @@ Python
{% endcomment %}
We will teach Python using the Jupyter Notebook,
- a programming environment that runs in a web browser (Jupyter Notebook will be installed by Anaconda). For this to work you will need a reasonably
+ a programming environment that runs in a web browser (Jupyter Notebook will be installed by Miniforge). For this to work you will need a reasonably
up-to-date browser. The current versions of the Chrome, Safari and
Firefox browsers are all
supported
@@ -48,33 +48,73 @@
Python
- - Open https://www.anaconda.com/download/success with your web browser.
- - Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer Anaconda3-...-Windows-x86_64.exe)
- - Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.
+ - Open https://conda-forge.org/download/ with your web browser.
+ - Download the Miniforge for Windows installer
+ - Double click on the downloaded file (Something like,
Minforge3-Windows-x86_64.exe
)
+ - If you get a "Windows protected your PC" pop-up from Microsoft Defender SmartScreen, click on "More info" and select "Run anyway"
+ - Follow through the installer using all of the defaults for installation except make sure to check Add Miniforge3 to my PATH environment variable.
+ {% comment %}
+ - Search for the application "Miniforge Prompt", open it and run:
conda install jupyter
and click Enter when asked for confirmation.
+ if we want to add an icon, it can be done with:
+ https://medium.com/@kostal91/create-a-desktop-shortcut-for-jupyterlab-on-windows-9fcabcfa0d3f - easier and more convenient using %userprofile% variable rather than users\%username%
+ and need to update miniconda for miniforge
+ Also, the https://pypi.org/project/start-jupyter-cm/ could be helpful.
+ {% endcomment %}
+ - Download the environment file.
+ (The following steps requires using the shell. If you aren't
+ comfortable doing the installation yourself
+ stop here and request help at the workshop.)
+
+ - Search for the application "Miniforge Prompt", open it and run:
conda env create -f .\Downloads\swc_environment.yml
+ - Close the terminal window.
- Video Tutorial
-
- - Open https://www.anaconda.com/download/success with your web browser.
- - Download the Anaconda Installer with Python 3 for macOS (you can either use the Graphical or the Command Line Installer).
- - Install Python 3 by running the Anaconda Installer using all of the defaults for installation.
+ - Open https://conda-forge.org/download/ with your web browser.
+ - Download the appropriate Miniforge installer for macOS
+ (The following steps requires using the shell. If you aren't
+ comfortable doing the installation yourself
+ stop here and request help at the workshop.)
+
+ -
+ Open a terminal window and navigate to the directory where
+ the executable is downloaded (e.g.,
cd ~/Downloads
).
+
+ -
+ Type
bash Miniforge3-
and then press
+ Tab to autocomplete the full file name. The name of
+ file you just downloaded should appear.
+
+ -
+ Press Enter
+ (or Return depending on your keyboard).
+ You will follow the text-only prompts.
+ To move through the text, press Spacebar.
+ Type
yes
and press enter to approve the license.
+ Press Enter (or Return)
+ to approve the default location
+ for the files.
+ Type yes
and press
+ Enter (or Return)
+ to prepend Anaconda to your PATH
+ (this makes the Anaconda distribution the default Python).
+
+ - Download the environment file.
+ - On the terminal run:
conda env create -f ~/Downloads/swc_environment.yml
+ -
+ Close the terminal window.
+
- Video Tutorial
-
- - Open https://www.anaconda.com/download/success with your web browser.
+ - Open https://conda-forge.org/download/ with your web browser.
+ - Download the appropriate Miniforge installer for Linux
+ (The following steps requires using the shell. If you aren't
+ comfortable doing the installation yourself
+ stop here and request help at the workshop.)
+
- Download the Anaconda Installer with Python 3 for Linux.
(The installation requires using the shell. If you aren't
comfortable doing the installation yourself
@@ -103,6 +143,8 @@ Video Tutorial
to prepend Anaconda to your PATH
(this makes the Anaconda distribution the default Python).
+ - Download the environment file.
+ - Search for the application "Miniforge Prompt", open it and run:
conda env create -f ~/Downloads/swc_environment.yml
-
Close the terminal window.
diff --git a/data/swc_environment.yml b/data/swc_environment.yml
new file mode 100644
index 00000000..b0aedcbf
--- /dev/null
+++ b/data/swc_environment.yml
@@ -0,0 +1,9 @@
+name: swc
+channels:
+ - conda-forge
+dependencies:
+ - ipykernel
+ - jupyer
+ - matplotlib
+ - numpy
+ - pandas
From 3b3918916ba1b0b1ddd8328605a97426942da9f1 Mon Sep 17 00:00:00 2001
From: David Perez-Suarez
Date: Wed, 23 Oct 2024 18:03:13 +0100
Subject: [PATCH 2/3] Fixes typo for environment dependencies
---
data/swc_environment.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/swc_environment.yml b/data/swc_environment.yml
index b0aedcbf..2799056c 100644
--- a/data/swc_environment.yml
+++ b/data/swc_environment.yml
@@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- ipykernel
- - jupyer
+ - jupyter
- matplotlib
- numpy
- pandas
From b431eaf1bdac447e6fef69c900009b0fd7f1d371 Mon Sep 17 00:00:00 2001
From: David Perez-Suarez
Date: Wed, 30 Oct 2024 16:20:44 +0000
Subject: [PATCH 3/3] Removes anaconda missing bits
---
_includes/install_instructions/python.html | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/_includes/install_instructions/python.html b/_includes/install_instructions/python.html
index 2abb996d..87bdb0de 100644
--- a/_includes/install_instructions/python.html
+++ b/_includes/install_instructions/python.html
@@ -97,8 +97,8 @@ Python
for the files.
Type yes
and press
Enter (or Return)
- to prepend Anaconda to your PATH
- (this makes the Anaconda distribution the default Python).
+ to prepend Miniforge to your PATH
+ (this makes the Miniforge distribution the default Python).
- Download the environment file.
- On the terminal run:
conda env create -f ~/Downloads/swc_environment.yml
@@ -115,17 +115,12 @@ Python
comfortable doing the installation yourself
stop here and request help at the workshop.)
- - Download the Anaconda Installer with Python 3 for Linux.
- (The installation requires using the shell. If you aren't
- comfortable doing the installation yourself
- stop here and request help at the workshop.)
-
-
Open a terminal window and navigate to the directory where
the executable is downloaded (e.g., `cd ~/Downloads`).
-
- Type
bash Anaconda3-
and then press
+ Type bash Miniforge3-
and then press
Tab to autocomplete the full file name. The name of
file you just downloaded should appear.
@@ -140,8 +135,8 @@ Python
for the files.
Type yes
and press
Enter (or Return)
- to prepend Anaconda to your PATH
- (this makes the Anaconda distribution the default Python).
+ to prepend Miniforge to your PATH
+ (this makes the Miniforge distribution the default Python).
- Download the environment file.
- Search for the application "Miniforge Prompt", open it and run:
conda env create -f ~/Downloads/swc_environment.yml