Catalina4astronomers
From MediaWiki
(Difference between revisions)
m (→Astropy) |
m (→Astropy) |
||
Line 40: | Line 40: | ||
pip install astropy | pip install astropy | ||
pip install pytest-astropy --upgrade | pip install pytest-astropy --upgrade | ||
+ | Test the installation from python: | ||
+ | import astropy | ||
+ | astropy.test() |
Revision as of 11:38, 5 September 2020
Contents |
Xcode
AppStore: Xcode terminal: xcode-select --install
python
brew install pyenv pyenv install 3.8.5 # 3.8.5 being the latest python version pyenv global 3.8.5 # set it as a global default version for pyenv environments pyenv version # Edit ~/.bash_profile with if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)" fi
Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Spyder
python3 -m venv Spyder-env # Create virtual environment source spyder-env/bin/activate # Activate it pip install spyder # Install spyder python3 -m pip install --upgrade pip # Upgrade pip pip install --upgrade spyder # To upgrade spyder spyder3 # Run spyder in its virtual env (spyder-env) deactivate # Deactivate environment
pPXF
Inside spyder-env install ppxf:
pip install ppxf
Example directory location:
pip show ppxf # [/Users/[name]/spyder-env/lib/python3.8/site-packages] ls /Users/anavudragovic/spyder-env/lib/python3.8/site-packages/ppxf/examples/ # Runable examples
Astropy
Inside spyder-env install astropy
pip install astropy pip install pytest-astropy --upgrade
Test the installation from python:
import astropy astropy.test()