Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version check of conda and update package versions #148

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions 00_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,41 @@ 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
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)

Expand Down Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion check_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'jupyterlab': ('3.1', None),
'astropy': ('5.2', None),
'scipy': ('1.0', None),
'pyvo': ('1.4', None),
'pyvo': ('1.4.2', None),
'astroquery': ('0.4.7dev', None),
'jupytext': ('1.14', None)
}
Expand Down
14 changes: 7 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up: There was an incompatibility with the md notebooks with jupyter-server 2+, so we need to keep an eye on it that none of these brings in that package as a dependency (or if they do, they pick up the correct version)

- pyvo>=1.4.2
- scipy>=1.11
- pip
- pip:
- jupytext>=1.14
Expand Down
Loading