Skip to content

Latest commit

 

History

History
124 lines (96 loc) · 3.32 KB

python_installation.md

File metadata and controls

124 lines (96 loc) · 3.32 KB

Python installation notes

  • Install Anaconda

    • https://www.continuum.io/downloads
      • Consider miniconda if you don't need all the dev tools in the full anaconda distribution.

      • Recommended to download python v3.6 as your default distribution.

      • DO NOT INSTALL AS ROOT OR ADMIN!

  • Modify path as necessary to point to Anaconda distribution (if not using pyenv)

  • Installation of pyenv is recommended using homebrew:

  brew update
  brew install pyenv
  • If you use miniconda, then install critical parts of python:
    conda install ipython
    conda install jupyter    
  • Updates/installation of fundamental packages:
    conda install scipy
    conda install numpy
    conda install astropy
  • pyND (this distribution; be sure to put it somewhere in your PYTHONPATH)
    git clone https://github.com/jchowk/pyND.git

You can download this directly from the site pointed to with that command. To update your PYTHONPATH variable to point to the directory, edit the file ~/.profile to include something like this:export PYTHONPATH="$PYTHONPATH:/Users/howk/python, where your pyND distribution is the directory containing the pyND distribution (which can be in a sub-directory).

  • linetools
    git clone https://github.com/linetools/linetools.git
    cd linetools
    python setup.py develop
  • pyigm
      git clone https://github.com/pyigm/pyigm.git
      cd pyigm
      python setup.py develop
  • specdb
    git clone https://github.com/specdb/specdb.git
    cd specdb
    python setup.py develop
- grab the database (see installation notes in `igmspec`)
  • astroquery [required for finder charts]

    pip install astroquery

  • emcee and corner:

  pip install emcee  
  pip install corner```

- Install non-standard packages
    - aplpy  [recommended; not essential]

      `pip install aplpy`

    - pyregion [maybe?]

      `pip install pyregion`

    - pymc3 [only required for some f(N) analysis in pyigm]
    git clone https://github.com/pymc-devs/pymc3.git
    cd pymc3
    python setup.py install```

On rebuilds of astropy, git clean -fxd or sudo git clean -fxd is your friend.

WARNING: sudo python may give you a version of Python that you aren’t expecting!