Skip to content

Update setup instructions for Python #242

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 6 additions & 7 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ You will need to install Python, Jupyter, and some additional libraries.
[Python](https://python.org) is a popular language for
scientific computing, and great for general-purpose programming as
well. For this workshop we use Python version 3.x.
Installing all of its scientific packages individually can be
a bit difficult, so we recommend an all-in-one installer.
We will use Anaconda.
Installing all of its scientific packages individually can be a bit difficult, so we provide an environment file to help you take care of them all together.
We will use the _Miniforge_ distribution of Python.

### Anaconda
### Python

Download and install [Anaconda](https://www.anaconda.com/download).
Download and install [MiniForge](https://conda-forge.org/download/).

To create a new Conda environment, which includes the additional packages we will be using
in this workshop, you will need the environment file (`environment.yml`) you downloaded in the data section.
Expand All @@ -58,7 +57,7 @@ conda activate AstronomicalData

We will test our environment setup using a test notebook (`test_setup.ipynb`) that you downloaded in the data section.

In a Terminal, Jupyter Prompt or Anaconda Prompt, make sure you are in the `student_download` directory.
In a Terminal, Jupyter Prompt or MiniForge Prompt, make sure you are in the `student_download` directory.
To start Jupyter, make sure you have activated your new conda environment, then run:

```
Expand All @@ -77,7 +76,7 @@ If they work and you get no error messages, **you are ready for the workshop**.
## Why didn't the imports work?

Occasionally learners will need to take one additional step to make Jupyter run within the environment we have created.
If your imports fail, close Jupyter by closing its terminal, and try running the following from your Anaconda prompt (
If your imports fail, close Jupyter by closing its terminal, and try running the following from your MiniForge Prompt (
Terminal or otherwise):

```
Expand Down
4 changes: 1 addition & 3 deletions student_download/environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: AstronomicalData
channels:
- default
- conda-forge
- astropy
dependencies:
- python>=3.6
- python>=3.11
- jupyter
- numpy
- matplotlib
Expand All @@ -14,4 +13,3 @@ dependencies:
- scipy
- astropy
- astroquery
- gala