Skip to main content

ANU Inversion Course Package

Project description

ANU Inversion Course Package

Build PyPI version

This package contains resources to be used in the inversion course practicals.

Table of contents

Getting started

1. Pre-requisites

Before installing the ANU-inversion-course package, make sure you have the following ready:

  • A computer with a recent OS.
  • OS-specific dependencies including a system package manager:
    • For Linux users:
      1. Familiarise yourself with the linux system package manager apt / dnf / pacman / yast etc.
    • For MacOS users:
      1. Download and install Xcode from "App Store" (you'll need to create an Apple account if not already done)
      2. Install the Xcode command line tools by typing this in "Terminal": xcode-select --install; sudo xcodebuild -license; sudo softwareinstall -i -a
      3. Install a recent package manager e.g. one of Anaconda (https://www.anaconda.com/), MacPorts (https://www.macports.org/), HomeBrew (https://brew.sh/)
    • For Windows users:
      1. Install the Cygwin package manager (https://www.cygwin.com/)
  • Install git, gcc, g++, gfortran and python (3.6+) using the package manager. Use the package manager search facility to find options.
  • Install any other software development tools you want using the package manager.
  • If necessary add your package manager installation directory to the system PATH environment variable so installed programs can/will be found.

These tools can usually be downloaded in source form and compiled however this should only be necessary if you have an unusual setup. Don't be tempted by web sites that claim easy one step package installs, install a package manager. Package managers are far superior in almost every way.

2. Set up a python virtual environment [optional]

It's recommended to use a python virtual environment (e.g. venv, virtualenv, mamba or conda) so that ANU-Inversion-Course doesn't conflict with your other Python projects.

Open a terminal (or a Cygwin shell for Windows users) and refer to the cheat sheet below for how to create, activate, exit and remove a virtual environment. $ is the system prompt.

venv

Ensure you have and are using python >= 3.6. It may not be called python but something like python3, python3.10 etc.

Use the first two lines below to create and activate the new virtual environment. The other lines are for your future reference.

$ python -m venv <path-to-new-env>/inversion_course           # to create
$ source <path-to-new-env>/inversion_course/bin/activate      # to activate
$ deactivate                                                  # to exit
$ rm -rf <path-to-new-env>/inversion_course                   # to remove
virtualenv

Use the first two lines below to create and activate the new virtual environment. The other lines are for your future reference.

$ virtualenv <path-to-new-env>/inversion_course -p=3.10       # to create
$ source <path-to-new-env>/inversion_course/bin/activate      # to activate
$ deactivate                                                  # to exit
$ rm -rf <path-to-new-env>/inversion_course                   # to remove
mamba

Use the first two lines below to create and activate the new virtual environment. The other lines are for your future reference.

$ mamba create -n inversion_course python=3.10                # to create
$ mamba activate inversion_course                             # to activate
$ mamba deactivate                                            # to exit
$ mamba env remove -n inversion_course                        # to remove
conda

Use the first two lines below to create and activate the new virtual environment. The other lines are for your future reference.

$ conda create -n inversion_course python=3.10                # to create
$ conda activate inversion_course                             # to activate
$ conda deactivate                                            # to exit
$ conda env remove -n inversion_course                        # to remove

3. Installation

Type the following in your terminal (or Cygwin shell for Windows users):

$ pip install jupyterlab matplotlib anu-inversion-course

4. Check

And when you run jupyter-lab to do the practicals, make sure you are in the same environment as where your anu-inversion-course was installed. You can try to test this by checking if the following commands give you similar result:

$ which pip
<some-path>/bin/pip
$ which jupyter-lab
<same-path>/bin/jupyter-lab
$ pip list | grep ANU-inversion-course
ANU-inversion-course               0.1.0

Troubleshooting

If you find problems importing anu_inversion_course.rf, try to search for the error message you get. Here contains a nice explanation for one possible cause. And here is how to locate libgfortran:

gfortran --print-file-name libgfortran.5.dylib # macOS

Developer Notes

Check out NOTES.md if you'd like to contribute to this package.

  1. Getting started
  2. Cheatsheet
    1. conda environment
    2. git operations
    3. package development
    4. package metadata
    5. package building test & release
  3. Adding C/C++ extensions
  4. Adding Fortran extensions
  5. More references
  6. Appendix - semantic versioning
  7. Additional Notes about gfortran

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ANU_inversion_course-0.1.1.tar.gz (1.5 MB view hashes)

Uploaded Source

Built Distributions

ANU_inversion_course-0.1.1-cp310-cp310-win_amd64.whl (180.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

ANU_inversion_course-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ANU_inversion_course-0.1.1-cp39-cp39-win_amd64.whl (180.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

ANU_inversion_course-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ANU_inversion_course-0.1.1-cp38-cp38-win_amd64.whl (180.2 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

ANU_inversion_course-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ANU_inversion_course-0.1.1-cp37-cp37m-win_amd64.whl (179.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

ANU_inversion_course-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

ANU_inversion_course-0.1.1-cp36-cp36m-win_amd64.whl (180.5 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

ANU_inversion_course-0.1.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page