Skip to content

Commit b419107

Browse files
Updated MAC install instructions for Anaconda w/ python 3
1 parent 03f6bbc commit b419107

1 file changed

Lines changed: 74 additions & 56 deletions

File tree

README.md

Lines changed: 74 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -361,37 +361,31 @@ Successfully installed h5py-2.7.0
361361

362362
## Mac Setup
363363

364-
### Installing Python
364+
### Pre-work with older Anaconda installs
365365

366-
Install Homebrew https://brew.sh/
367-
brew install python
366+
> cn ~ $ rm -rf ~/anaconda2
368367
369-
### Installing Pip
368+
Remove the export for this install
369+
> cn ~ $ vi ~.bash_profile
370370
371-
Anaconda was already setup... from an older Continuium Download so this area needs to be re-worked from a scatch build.
372371

373-
* Python 2.7.12 :: Anaconda custom (x86_64)
374372

375-
> cn ~ $ pip -V
376373

377-
```bash
378-
379-
pip 8.1.1 from /Users/cn/anaconda/lib/python2.7/site-packages (python 2.7)
374+
### Installing Python w/ Anaconda
375+
* Download the bash script from https://www.continuum.io/downloads#macos
376+
* I'm using the latest version for python 3... since I had issues with some older libs with python2
380377

381-
```
378+
cd Downloads
379+
> bash Anaconda3-4.3.1-MacOSX-x86_64.sh
382380
383-
> cn ~ $ sudo easy_install --upgrade pip
381+
>
384382
385-
```bash
383+
### Verify Python & Pip Installs
384+
> cn ~ $ python -V | pip -V
386385
387-
Best match: pip 9.0.1
388-
```
389-
390-
> cn ~ $ pip -V
391-
392-
```bash
393-
394-
pip 9.0.1 from /Users/cn/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg (python 2.7)
386+
```bash
387+
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)
388+
pip 9.0.1 from /Users/cn/anaconda3/lib/python3.6/site-packages (python 3.6)
395389
```
396390

397391
### Install Tensorflow
@@ -403,50 +397,46 @@ https://www.tensorflow.org/install/install_mac
403397
> cn ~ $ python
404398
405399
```bash
406-
407-
Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:43:17)
408-
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
400+
Python 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
401+
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
409402
Type "help", "copyright", "credits" or "license" for more information.
410-
Anaconda is brought to you by Continuum Analytics.
411-
Please check out: http://continuum.io/thanks and https://anaconda.org
403+
>>> import tensorflow tf
404+
File "<stdin>", line 1
405+
import tensorflow tf
406+
^
407+
SyntaxError: invalid syntax
412408
>>> import tensorflow as tf
413409
>>> hello = tf.constant('Hello, TensorFlow!')
410+
>>> sess = tf.Session()
414411
>>> sess = tf.Session()
415-
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions,
416-
but these are available on your machine and could speed up CPU computations.
417-
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions,
418-
but these are available on your machine and could speed up CPU computations.
419-
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions,
420-
but these are available on your machine and could speed up CPU computations.
421-
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions,
422-
but these are available on your machine and could speed up CPU computations.
423-
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions,
424-
but these are available on your machine and could speed up CPU computations.
412+
2017-05-08 20:29:44.953858: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
413+
2017-05-08 20:29:44.953899: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
414+
2017-05-08 20:29:44.953912: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
415+
2017-05-08 20:29:44.953925: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
416+
2017-05-08 20:29:44.953936: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
425417
>>> print(sess.run(hello))
426-
Hello, TensorFlow!
418+
b'Hello, TensorFlow!'
427419
428420
```
429-
430-
cn ~ $ python -c 'import tensorflow as tf; print(tf.__version__)' # for Python 2
431-
1.0.1
421+
#### Check the Version of TensorFlow
422+
cn ~ $ python -c 'import tensorflow as tf; print(tf.__version__)'
423+
1.1.0
432424
433425
### Test numpy, scipy
434426
435427
> cn ~ $ python
436428
437429
```python
438430
439-
Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:43:17)
440-
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
431+
Python 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
432+
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
441433
Type "help", "copyright", "credits" or "license" for more information.
442-
Anaconda is brought to you by Continuum Analytics.
443-
Please check out: http://continuum.io/thanks and https://anaconda.org
444434
>>> import scipy
445435
>>> import numpy
446436
>>> scipy.__version__
447-
'0.15.0'
437+
'0.18.1'
448438
>>> numpy.__version__
449-
'1.12.1'
439+
'1.11.3'
450440
>>> quit()
451441
452442
```
@@ -455,24 +445,52 @@ Please check out: http://continuum.io/thanks and https://anaconda.org
455445
456446
> cn ~ $ pip install --upgrade keras
457447
458-
Make TensorFlow the default engine for Keras
459-
460448
### Make Sure Keras runs
461449
450+
```bash
451+
452+
Collecting keras
453+
Downloading Keras-2.0.4.tar.gz (199kB)
454+
100% |████████████████████████████████| 204kB 342kB/s
455+
Collecting theano (from keras)
456+
Downloading Theano-0.9.0.tar.gz (3.1MB)
457+
100% |████████████████████████████████| 3.1MB 108kB/s
458+
Requirement already up-to-date: pyyaml in ./anaconda3/lib/python3.6/site-packages (from keras)
459+
Requirement already up-to-date: six in ./anaconda3/lib/python3.6/site-packages (from keras)
460+
Collecting numpy>=1.9.1 (from theano->keras)
461+
Downloading numpy-1.12.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.4MB)
462+
100% |████████████████████████████████| 4.4MB 126kB/s
463+
Collecting scipy>=0.14 (from theano->keras)
464+
Downloading scipy-0.19.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.2MB)
465+
100% |████████████████████████████████| 16.2MB 40kB/s
466+
Building wheels for collected packages: keras, theano
467+
Running setup.py bdist_wheel for keras ... done
468+
Stored in directory: /Users/cn/Library/Caches/pip/wheels/48/82/42/f06a8c03a8f95ada523a81ba723e89f059693e6ad868d09727
469+
Running setup.py bdist_wheel for theano ... done
470+
Stored in directory: /Users/cn/Library/Caches/pip/wheels/d5/5b/93/433299b86e3e9b25f0f600e4e4ebf18e38eb7534ea518eba13
471+
Successfully built keras theano
472+
Installing collected packages: numpy, scipy, theano, keras
473+
Found existing installation: numpy 1.11.3
474+
Uninstalling numpy-1.11.3:
475+
Successfully uninstalled numpy-1.11.3
476+
Found existing installation: scipy 0.18.1
477+
Uninstalling scipy-0.18.1:
478+
Successfully uninstalled scipy-0.18.1
479+
Successfully installed keras-2.0.4 numpy-1.12.1 scipy-0.19.0 theano-0.9.0
480+
481+
```
482+
462483
> cn ~ $ python
463484
464485
```bash
465486
466-
Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:43:17)
467-
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
487+
cn ~ $ python
488+
Python 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
489+
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
468490
Type "help", "copyright", "credits" or "license" for more information.
469-
Anaconda is brought to you by Continuum Analytics.
470-
Please check out: http://continuum.io/thanks and https://anaconda.org
471-
>>> import keras; keras.__version__
491+
>>> import keras
472492
Using TensorFlow backend.
473-
'2.0.4'
474493
475-
>>> quit()
476494
477495
```
478496
@@ -481,5 +499,5 @@ Using TensorFlow backend.
481499
[Blog](https://ermaker.github.io/blog/2016/06/22/get-started-with-keras-for-beginners-tensorflow-backend.html)
482500
483501
> cn ~ $ curl -sSL https://github.com/fchollet/keras/raw/master/examples/mnist_mlp.py | python
484-
502+
If this script runs... everything is working.
485503

0 commit comments

Comments
 (0)