Debian Codegraph @

INSTALL-OSX.md

raw
1 Installation on OS X Mavericks
2 ---------------
3 These instructions are community provided, tested with Python 2.7.5 and using the _Junos PyEZ_ library version 0.1.2.
4
5 ### Operating Systems
6 - OS X Mavericks
7
8
9 When you upgrade your Mac to OS X Mavericks, Apple deletes your X11 and any addons under /Library/Python/2.7/site-packages. There are plenty of posts on the Internet that describe how to restore your Python development environment, but this post will focus on the Juniper Junos PyEZ framework.
10
11 Github has Mac client available that includes command line tools and a native GUI app. - https://help.github.com/articles/set-up-git.
12
13 Install Homebrew - http://brew.sh.
14
15 #### Installation:
16
17 If you have never used Python on your Mac, you will want to install X11 & Xcode. Some Python packages have dependencies that rely on these packages.
18 1. Install X11 – The latest image can be found here.
19 2. Install Xcode - https://developer.apple.com/xcode/ - you may have to register as a developer, but there is no charge to get access to Xcode.
20 3. After Xcode is installed, install the command line tools.
21 1. Open a Terminal window.
22 2. Type: ```xcode-select –install```
23 4. Install Git or the GitHub client.
24 5. Create a symbolic link so that the tools we are about to install will compile without issues.
25 1. Open a Terminal Window.
26 2. Type: ```sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2/libxml/ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml```
27 3. NOTE: this is a single, long string.
28 6. Install lxml with easy_install
29 1. In a terminal window, type: ```sudo easy_install lxml```
30 2. Easy_install works the best to install lxml
31 7. Download the ncclient repository from Github.
32 1. From a terminal window, navigate to the ncclient download directory. I save to a GitHub directory under ~/Documents.
33 ```
34 cd Documents/GitHub/ncclient
35 sudo python setup.py install
36 ```
37 8. Download the py-junos-eznc repository from Github
38 1. In the same terminal window, navigate to the py-junos-eznc directory
39 ```
40 cd ../py-junos-eznc/
41 sudo python setup.py install
42 ```
43 9. Finally, I would install getpass, which is used in some scripts, using easy_install.
44 1. sudo easy_install getpass