Installationยถ
For installing this code we assume you have a Python environment set up, into which you can install packages via pip. If so, please continue to one of the installation options below.
If this isn't the case, we recommend installing the Anaconda Python distribution, and using conda to manage the python environment(s) you have installed on your computer. One tutorial (of many) about how to get started with Python and creating conda environments is available here.
Basic Installationยถ
If you want to install into your current environment, the basic installation should be pretty simple. From the Terminal or Anaconda Prompt, please run
pip install cu-astr3510
and it should install everything, along with all the necessary dependencies.
If you previously installed this package and need to grab a newer version, run
pip install --upgrade cu-astr3510
to download any officially released updates.
Basic Installation in New conda Environmentยถ
If you are at all worried about the installation messing up other existing packages on your computer or if you're having trouble getting a tricky dependency to install, please consider installing into a new conda environment. Environments are independent of each other, so what you install into one shouldn't affect others.
From the Terminal or Anaconda Prompt, please run
conda create -n my-neato-astr3510-environment python=3.10
to create a new, empty environment centered on a recent-ish version of python. You may want to choose a shorter name for your neato environment, as it's something you'll need to type every time you want to use this environment. Run
conda activate my-neato-astr3510-environment
to enter than environment. You can check that you're in it by running
conda env list
and looking for a little star next to the environment name. Now, from within this environment, run
pip install --upgrade cu-astr3510
to install astr3510 and all its dependencies (or follow the Developer Installation instructions immediately below), into this specific environment.
One thing to watch out for is that if you haven't installed whatever tools you use to work with python (such as jupyter or spyder) into this environment, you might not be able to open them or you might open them from your base environment without access to astr3510. To fix that, run
conda install jupyter spyder
from inside your environment. From now on, whenever you want to use this environment, activate it with
conda activate my-neato-astr3510-environment
and then open your python interface from within that environment, as with any one of these
jupyter notebook
jupyter lab
spyder
Good luck!
Developer Installationยถ
If you want to install this code while being able to edit and develop it, you can clone its GitHub repository onto your own computer. This allows you to edit it for your own sake and/or to draft changes that can be contributed to the public package (see Contributing ๐ Code with GitHub).
To install directly as an editable package on your local computer, run
git clone https://github.com/zkbt/cu-astr3510.git
cd cu-astr3510
pip install -e '.[develop]'
The -e . will point your environment's astr3510 package to your local folder, meaning that any changes you make in the repository will be reflected in what Python sees when it tries to import astr3510. Including the [develop] after the . will install both the dependencies for the package itself and the extra dependencies required for development (= testing and documentation).
Did it work?ยถ
You can quickly test whether your installation worked, and what version you have, by running the Python code
import astr3510
astr3510.version()
'0.1.3'
Happy coding!๐งโ๐ป๐๐จ๐ค