These are the manual installation instructions for installing the Pebble SDK from a download bundle. We recommend you install the SDK using Homebrew instead, if possible.
Python version: the Pebble SDK requires Python 2.7. At this time, the Pebble SDK is not compatible with Python 3. However, some newer distributions come with both Python 2.7 and Python 3 installed, which can cause problems. You can use
python --version
to determine which is being used. This means you may need to runpip2
instead ofpip
when prompted to do so below.
Install the Xcode Command Line Tools from Apple if you do not have them already.
If you have not already, download the latest version of the SDK.
Open Terminal window and create a directory to host all Pebble tools:
mkdir ~/pebble-dev/
Change into that directory and extract the Pebble SDK that you just downloaded, for example:
cd ~/pebble-dev/
tar -jxf ~/Downloads/pebble-sdk-4.5-mac.tar.bz2
You should now have the directory
~/pebble-dev/pebble-sdk-4.5-mac
with the SDK files and directories inside it.
Add the pebble
tool to your path and reload your shell configuration:
echo 'export PATH=~/pebble-dev/pebble-sdk-4.5-mac/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
You can now continue on and install the rest of the dependencies.
The Pebble SDK depends on Python libraries to convert fonts and images from your computer into Pebble resources.
You need to use the standard Python easy_install
package manager to install
the alternative pip
package manager. This is then used to install other Python
dependencies.
Follow these steps in Terminal:
Install pip
and virtualenv
:
sudo easy_install pip
sudo pip install virtualenv
Install the Python library dependencies locally:
cd ~/pebble-dev/pebble-sdk-4.5-mac
virtualenv --no-site-packages .env
source .env/bin/activate
CFLAGS="" pip install -r requirements.txt
deactivate
Note: virtualenv is not optional.
To manipulate and generate fonts, the Pebble SDK requires the freetype library. If you intend to use custom fonts in your apps, please use homebrew to install the freetype library.
brew install freetype
The Pebble emulator requires some libraries that you may not have installed on your system.
The easiest way to install these dependencies is to use homebrew.
brew update
brew install boost-python
brew install glib
brew install pixman
If you have installed Python using Homebrew, you must install boost-python from source. You can do that with
brew install boost-python --build-from-source
.
Now that you have the Pebble SDK downloaded and installed on your computer, it is time to learn how to write your first app!
You should checkout the Tutorials for a step-by-step look at how to write a simple C Pebble application.
If you have any issues with downloading or installing the Pebble SDK, you should take a look at the SDK Help category on our forums.
Alternatively, you can send us a message letting us know what issues you're having and we will try and help you out.