Skip to content

Adding install dependencies script #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,32 @@ This approach is recommended if you prefer the smallest download. If you experie

* [How-to install the RC using pip.](setup/install-pip.md)

### Want to report a bug?
---
If you get stuck, please refer to the full installation [instructions](https://www.tensorflow.org/install/) on tensorflow.org.

# Install other Dependencies

* **For Linux only**, run: `$ sudo install_dependencies.sh --python_version (2 or 3)`, python_version is an optional argument the script will install the dependencies for both versions of Python 2 and 3 if not explictly defined. For more details check [install_dependices.sh](install_dependencies.sh).

Or Install dependencies manyally:
* `python2 -m pip install jupyter numpy pandas matplotlib pillow`
* `python3 -m pip install jupyter numpy pandas matplotlib pillow`

For other OS check the next section.

**If you are not familiar with [Jupyter notebooks](http://jupyter.readthedocs.io/en/latest/index.html) is recommened to visit the website and learn more about it.**

## Test if everything is working properly

1. Clone this repo or download it
2. $ cd tensorflow-workshop
3. $ jupyter notebook
4. run test_install.ipynb
5. If you see any errors with the libraries, make sure you have them installed and run test_install.ipynb again.

# Want to report a bug?

Thanks! Can you please file an issue, or even better, a pull request? We'll be doing this workshop a couple times, and future developers will appreciate your help.

- - -
General disclaimer, this is my personal repo and not an official Google product. If you'd like to use this code, say, to build a mission critical component of your giant space laser, you should know there's no warranty, etc.
General disclaimer, this is my personal repo and not an official Google product. If you'd like to use this code, say, to build a mission critical component of your giant space laser, you should know there's no warranty, etc.
45 changes: 45 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

PYTHON_VERSION="2 and 3"

function p2 {
apt-get install python-pip
python2 -m pip install --upgrade pip
python2 -m pip install jupyter numpy pandas matplotlib pillow
}

function p3 {
apt-get install python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install jupyter numpy pandas matplotlib pillow
}

while [[ $# -gt 1 ]]
do
key="$1"

case $key in
--python_version)
PYTHON_VERSION="$2"
shift # past argument
;;
*)
# unknown option
;;
esac

shift # past argument or value
done

echo PYTHON_VERSION = "${PYTHON_VERSION}"

if [ "${PYTHON_VERSION}" == "2 and 3" ]; then
p2
p3
elif [ "${PYTHON_VERSION}" == "2" ]; then
p2
elif [ "${PYTHON_VERSION}" == "3" ]; then
p3
else
echo 'bad argument'
fi