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 chromatic-lightcurves
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 chromatic-lightcurves
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-chromatic-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 chromatic
environment, as it's something you'll need to type every time you want to use this environment. Run
conda activate my-neato-chromatic-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 chromatic-lightcurves
to install chromatic
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 chromatic
. 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-chromatic-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/chromatic.git
cd chromatic
pip install -e '.[develop]'
The -e .
will point your environment's chromatic
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 chromatic
. 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 chromatic
chromatic.version()
'0.4.12'
Happy chromatic
-ing!