Skip to content

Commit

Permalink
fix pip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisparnin authored Aug 24, 2018
1 parent 5292086 commit 72bc1ca
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions tools/jupyter/jupyter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- hosts: all
- hosts: all
become: yes
tasks:

Expand All @@ -13,30 +13,41 @@
- debug:
msg: "Python Version output: {{python_version}}"
# https://stackoverflow.com/questions/26028416/why-does-python-print-version-info-to-stderr
# Python version outputs to stdout or stderr depending on version.
# Python version outputs to stdout or stderr depending on version.

- name: Install required system packages.
apt: pkg={{ item }} state=present
with_items:
- python-numpy
- python-scipy
# - python-numpy
- python-scipy
- python-matplotlib
- python-pandas
- python-pandas
when: python_version.stdout.startswith('Python 2') or python_version.stderr.startswith('Python 2')

- name: Install numpy
pip: name=numpy extra_args=--user executable=pip
when: python_version.stdout.startswith('Python 2') or python_version.stderr.startswith('Python 2')

- name: Install Jupyter
pip: name=jupyter
pip: name=jupyter executable=pip
when: python_version.stdout.startswith('Python 2') or python_version.stderr.startswith('Python 2')
become: yes

- name: Install required system packages.
apt: pkg={{ item }} state=present
with_items:
- python3-numpy
- python3-scipy
# - python3-numpy
- python3-scipy
- python3-matplotlib
- python3-pandas
- python3-pandas
- python3-pip
when: python_version.stdout.startswith('Python 3') or python_version.stderr.startswith('Python 3')

- name: Install numpy
pip: name=numpy extra_args=--user
when: python_version.stdout.startswith('Python 3') or python_version.stderr.startswith('Python 3')

- name: Install Jupyter
pip: name=jupyter
when: python_version.stdout.startswith('Python 3') or python_version.stderr.startswith('Python 3')
become: yes

0 comments on commit 72bc1ca

Please sign in to comment.