From 9b4c35793fd64e047327d5f45f376b43c0d12fd4 Mon Sep 17 00:00:00 2001 From: David Shupe Date: Wed, 13 Dec 2023 10:42:34 -0800 Subject: [PATCH 1/4] Add a version check and remove libmamba-solver step --- 00_SETUP.md | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/00_SETUP.md b/00_SETUP.md index 1401d93..39fc0b8 100644 --- a/00_SETUP.md +++ b/00_SETUP.md @@ -21,7 +21,7 @@ operating system: [https://docs.conda.io/en/latest/miniconda.html](https://docs. On Windows, you might also need [additional compilers](https://github.com/conda/conda-build/wiki/Windows-Compilers). -## 2. Open the conda command prompt +## 2. Update conda version *Miniconda includes an environment manager called conda. Environments allow you to have multiple sets of Python packages installed at the same @@ -29,16 +29,33 @@ time, making reproducibility and upgrades easier. You can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them. For this workshop, we will configure the environment using the conda command prompt.* -On Mac or Linux, the `bash` shell will handle the conda commands. Open your terminal and verify your shell environment: +Open a terminal window and verify that conda is working: -```console -echo $SHELL -``` + % conda info + +If you are having trouble, check your shell in a terminal window: + + % echo $SHELL + +then run the initialization if needed, in that same terminal window: + + % conda init `basename $SHELL` + +You should open a new terminal window after `conda init` is run. + +It is advisable to update your conda to the latest version. We recommend a minimum +version of 23.10.0. Check your conda version with: -If the output text does not contain `bash`, switch to the bash shell before -being able to run anything related to conda. + % conda --version + +Update it with: + + % conda update conda + +or + + % conda update -n base conda -On Windows, open the `Anaconda Prompt` terminal app. ## 3. Install git (if needed) @@ -76,17 +93,10 @@ following: cd navo-workshop ``` -To speed up the installation of the environment, install the -`conda-libmamba-solver` package: - -```console -conda install conda-libmamba-solver -``` - -And finally, on any platform, to install and activate the conda environment for the workshop, type: +To install and activate the conda environment for the workshop, type: ```console -conda env create --solver=libmamba --file environment.yml +conda env create --file environment.yml conda activate navo-env ``` From 973390a4b42bb435851d8f4e704ccc61a1629387 Mon Sep 17 00:00:00 2001 From: David Shupe Date: Wed, 13 Dec 2023 10:42:51 -0800 Subject: [PATCH 2/4] update versions of packages --- check_env.py | 12 ++++++------ environment.yml | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/check_env.py b/check_env.py index 06b37b7..01c3871 100644 --- a/check_env.py +++ b/check_env.py @@ -12,12 +12,12 @@ # Set both min and max versions to avoid ambiguity. # This should match environment.yml file. PKGS = {'jupyter': None, - 'numpy': ('1.24', None), - 'matplotlib': ('3.2', None), - 'jupyterlab': ('3.1', None), - 'astropy': ('5.2', None), - 'scipy': ('1.0', None), - 'pyvo': ('1.4', None), + 'numpy': ('1.26', None), + 'matplotlib': ('3.8', None), + 'jupyterlab': ('4.0', None), + 'astropy': ('6.0', None), + 'scipy': ('1.11', None), + 'pyvo': ('1.4.2', None), 'astroquery': ('0.4.7dev', None), 'jupytext': ('1.14', None) } diff --git a/environment.yml b/environment.yml index fa9b82d..34c4474 100644 --- a/environment.yml +++ b/environment.yml @@ -2,13 +2,13 @@ name: navo-env channels: - conda-forge dependencies: - - python=3.9 - - numpy>=1.24 - - astropy>=5.2 - - matplotlib>=3.2 - - jupyterlab>=3.1 - - pyvo>=1.4 - - scipy>=1.0 + - python=3.11 + - numpy>=1.26 + - astropy>=6.0 + - matplotlib>=3.8 + - jupyterlab>=4.0 + - pyvo>=1.4.2 + - scipy>=1.11 - pip - pip: - jupytext>=1.14 From 753c9784964ea895c31c2dba61467ca17859aeff Mon Sep 17 00:00:00 2001 From: David Shupe Date: Wed, 13 Dec 2023 12:50:41 -0800 Subject: [PATCH 3/4] back off minimum checked astropy version to 5.2 --- check_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_env.py b/check_env.py index 01c3871..ba5b8cc 100644 --- a/check_env.py +++ b/check_env.py @@ -15,7 +15,7 @@ 'numpy': ('1.26', None), 'matplotlib': ('3.8', None), 'jupyterlab': ('4.0', None), - 'astropy': ('6.0', None), + 'astropy': ('5.2', None), 'scipy': ('1.11', None), 'pyvo': ('1.4.2', None), 'astroquery': ('0.4.7dev', None), From 8e474b77e3b617a6f5b031208280186cd78083c8 Mon Sep 17 00:00:00 2001 From: David Shupe Date: Wed, 13 Dec 2023 13:01:05 -0800 Subject: [PATCH 4/4] reset checked versions to their previous values --- check_env.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_env.py b/check_env.py index ba5b8cc..53278f1 100644 --- a/check_env.py +++ b/check_env.py @@ -12,11 +12,11 @@ # Set both min and max versions to avoid ambiguity. # This should match environment.yml file. PKGS = {'jupyter': None, - 'numpy': ('1.26', None), - 'matplotlib': ('3.8', None), - 'jupyterlab': ('4.0', None), + 'numpy': ('1.24', None), + 'matplotlib': ('3.2', None), + 'jupyterlab': ('3.1', None), 'astropy': ('5.2', None), - 'scipy': ('1.11', None), + 'scipy': ('1.0', None), 'pyvo': ('1.4.2', None), 'astroquery': ('0.4.7dev', None), 'jupytext': ('1.14', None)