Mac OS X

From Pinguino
Jump to: navigation, search

Introduction

The Pinguino IDE is written in Python.


Mountain Lion (OS X 10.8.x)

You do not need to install Python because Mountain Lion already includes installations of Python v2.7 (32 bit and 64 bit which is the default). However, you do have to install some other essential packages.

Mac OS X Developer Tools

You will need the Mac OS X Developer Tools to compile anything. If you type: gcc in a terminal and get "command not found", you need to install the compiler and its associated OS X SDKs (Software Development Kits) which are all included in the Mac OS X developer tools package. Go the the Mac App Store and install the free Xcode package. Once you have installed it, you need to run Xcode and select Xcode -> Preferences. A new window will pop up. Select the “Downloads” tab and then the "Components" sub-tab on top of which you should see “Command Line Tools” listed. Click on the “Install” button located next to it.

libusb

  • Download the libusb 0.1.13 binary for Mountain Lion from here.
  • Open a command line terminal (the terminal.app program is in the /Applications/Utilities folder).
  • ungzip and untar the archive on the command line with gunzip libusbv0.1.13beta.pkg.tar.gz && tar xvf libusbv0.1.13beta.pkg.tar
  • Run the install package on the command line with open libusb.pkg and follow the installation prompts.
  • Note: you may need to install libusb a second time if your Pinguino does not show up later.

pyusb

  • Download the pyusb 0.4.3 source code from here
  • Open a terminal
  • ungzip and untar the archive on the command line with gunzip pyusb-0.4.3.tar.gz && tar xvf pyusb-0.4.3.tar
  • Compile and install pyusb with the command sudo python setup.py install from inside the pyusb-0.4.3 directory.

pyserial

  • Download pyserial 2.5 from here
  • Open a terminal
  • ungzip and untar the archive on the command line with gunzip pyserial-2.5.tar.gz && tar xvf pyserial-2.5.tar
  • install pyserial on the command line with sudo python setup.py install from inside the pyserial-2.5 directory.

wxPython

You need to download wxPython v2.8 (this is a Pinguino IDE dependency - do not be tempted to use a later version) from here. As it is a disk image (dmg) all you need do is double-click on the downloaded file and run the installer.

Pinguino IDE

  • Download and unpack the latest version of the Pinguino IDE into a directory (~/pinguino, for example)
  • Inside the IDE directory, run the following command to start the IDE ./PinguinoOSX.command
  • If all goes well, congratulations! Otherwise, see the pinguino.log file in the same directory for details of what went wrong.
    For example:
  
  Pinguino started at Tue Apr 16 21:31:06 2013
  Python version is OK (>=2.5)
  System host is Mac OS X
  8-bit compiler OK.
  32-bit compiler OK.
  wx.python successfully loaded
  Regex successfully loaded
  Shutil successfully loaded
  Subprocess successfully loaded
  GetText successfully loaded
  Locale successfully loaded
  WebBrowser successfully loaded
  USB successfully loaded
  Threading successfully loaded
  Variables successfully loaded
  Frames successfully loaded
  functionsHelp successfully loaded
  Stdout successfully loaded 
  Preferences successfully loaded
  ArgParse successfully loaded
  Pinguino Boards List successfully loaded
  Pic List successfully loaded
  Editor successfully loaded
  Pinguino Uploader successfully loaded
  Everything is OK.
  
  • To resolve any installation issues, see the Troubleshooting section below.

Lion (Mac OS X 10.7)

You do not need to install Python because Mountain Lion already includes installations of Python v2.7 (32 bit and 64 bit which is the default). However, you do have to install some other essential packages.

Mac OS X Developer Tools

You will need the Mac OS X Developer Tools to compile anything. If you type: gcc in a terminal and get "command not found", you need to install the compiler and its associated OS X SDKs (Software Development Kits) which are all included in the Mac OS X developer tools package. Go the the Mac App Store and install the free Xcode package. Once you have installed it, you need to run Xcode and select Xcode -> Preferences. A new window will pop up. Select the “Downloads” tab and then the "Components" sub-tab on top of which you should see “Command Line Tools” listed. Click on the “Install” button located next to it.

libusb

  • Download the libusb 0.1.13 binary for Lion from here.
  • Open a command line terminal (the terminal.app program is in the /Applications/Utilities folder).
  • ungzip and untar the archive on the command line with gunzip libusbv0.1.13beta.pkg.tar.gz && tar xvf libusbv0.1.13beta.pkg.tar
  • Run the install package on the command line with open libusb.pkg and follow the installation prompts.
  • Note: you may need to install libusb a second time if your Pinguino board does not show up later.

pyusb

  • Download the pyusb 0.4.3 source code from here
  • Open a terminal
  • ungzip and untar the archive on the command line with gunzip pyusb-0.4.3.tar.gz && tar xvf pyusb-0.4.3.tar
  • Compile and install pyusb with the command sudo python setup.py install from inside the pyusb-0.4.3 directory.

pyserial

  • Download pyserial 2.5 from here
  • Open a terminal
  • ungzip and untar the archive on the command line with gunzip pyserial-2.5.tar.gz && tar xvf pyserial-2.5.tar
  • install pyserial on the command line with sudo python setup.py install from inside the pyserial-2.5 directory.

wxPython

You need to download wxPython v2.8 (this is a Pinguino IDE dependency - do not be tempted to use a later version) from here. As it is a disk image (dmg) all you need do is double-click on the downloaded file, and when the folder window opens, double-click on the pkg file to run the installer and follow the installation prompts.

Pinguino IDE

  • Download and unpack the latest version of the Pinguino IDE into a directory (~/pinguino, for example)
  • Inside the IDE directory, run the following command to start the IDE ./PinguinoOSX.command
  • If all goes well, congratulations! Otherwise, see the pinguino.log file in the same directory for details of what went wrong.
    For example:
  
  Pinguino started at Sat Apr 20 14:45:25 2013
  Python version is OK (>=2.5)
  System host is Mac OS X
  8-bit compiler OK.
  32-bit compiler OK.
  wx.python failed, try to install wx.python
  Regex successfully loaded
  Shutil successfully loaded
  Subprocess successfully loaded
  GetText successfully loaded
  Locale successfully loaded
  WebBrowser successfully loaded
  USB successfully loaded
  Threading successfully loaded
  Variables successfully loaded
  Frames successfully loaded
  functionsHelp successfully loaded
  Stdout successfully loaded
  Preferences successfully loaded
  ArgParse successfully loaded
  Pinguino Boards List successfully loaded
  Pic List successfully loaded
  Editor successfully loaded
  Pinguino Uploader successfully loaded
  
  • To resolve any installation issues, see the Troubleshooting section below.

Snow Leopard (Mac OS X 10.6.x)

You do not need to install Python because Snow Leopard already includes installations of Python v2.6 (32 bit and 64 bit which is the default) and wxPython (32 bit only). However, you do have to install some other essential packages.

Mac OS X Developer Tools

You will need the Mac OS X Developer Tools to compile anything. If you type: gcc in a terminal and get "command not found", you need to install the compiler and its associated OS X SDKs (Software Development Kits) which are all included in the Mac OS X developer tools package. You can install the developer tools package from your Mac OS X installation DVD. The latest versions may be downloaded from developer.apple.com.

libusb

  • Download the libusb 0.1.4 universal binary for Snow Leopard from here.
  • Open a command line terminal (the terminal.app program is in the /Applications/Utilities folder).
  • ungzip and untar the archive on the command line with gunzip libusbv.pkg.tar.gz && tar xvf libusb.pkg.tar
  • Run the install package on the command line with open libusb.pkg and follow the installation prompts.
  • Note: you may need to install libusb a second time if your Pinguino does not show up.

pyusb

  • Download the pyusb 0.4.3 source code from here
  • Before you compile and install the pyusb source code, you need to fix the paths in setup.py for Snow Leopard by:
  1. adding '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib' to the extra_link_args
  2. adding '-I/Developer/SDKs/MacOSX10.6.sdk/usr/include' to the extra_compile_args

and then you can compile and install pyusb with the command sudo python setup.py install.

pyserial

  • Download pyserial 2.5 from here
  • Open a terminal
  • unzip and untar the archive on the command line with gunzip pyserial-2.5.tar.gz && tar xvf pyserial-2.5.tar
  • install pyserial on the command line with sudo python setup.py install from inside the pyserial-2.5 directory.

wxPython

wxPython is already installed as part of the operating system.

Pinguino IDE

  • Download and unpack the latest version of the Pinguino IDE into a directory (~/pinguino, for example)
  • Inside the IDE directory, run the following command to start the IDE ./PinguinoOSX.command
  • If all goes well, congratulations! Otherwise, see the pinguino.log file in the same directory for details of what went wrong.
    For example:
  
  Python version is OK (>=2.5)
  System host is Mac OS X
  8-bit compiler OK.
  32-bit compiler OK.
  wx.python successfully loaded
  Regex successfully loaded
  Shutil successfully loaded
  Subprocess successfully loaded
  GetText successfully loaded
  Locale successfully loaded
  WebBrowser successfully loaded
  USB successfully loaded
  Serial successfully loaded
  Threading successfully loaded
  Frames successfully loaded
  functionsHelp successfully loaded
  AutoCompleter successfully loaded
  Preferences successfully loaded
  ArgParse successfully loaded
  Pinguino Boards List successfully loaded
  Editor successfully loaded
  Pinguino Uploader successfully loaded
  pySVN failed, try to install pySVN
  Enable to check new version of Pinguino IDE
  
  • To resolve any installation issues, see the Troubleshooting section below.


Troubleshooting

Pinguino IDE

See the IDE Bugs page.