Skip to content

Dependencies

DeRaafMedia edited this page Oct 28, 2014 · 19 revisions

This software is written specifically with Python version 2.7. It still has a large user base. It still offers some packages not compatible with Python 3.x.

I try to limit the extra packages that need to be installed to run this software. One thing I really couldn't avoid, was to install pySerial (http://pyserial.sourceforge.net)

Install hints and tips:


Mac OS X

I recommend to NOT install extra Python packages in the Apple supplied Python install. I personally use MacPorts (https://www.macports.org/) to create a separate Python install for 'experimentation' (but also for daily use, I just don't want to mess up the system Python install). You can use HomeBrew (http://brew.sh) or Fink (http://www.finkproject.org) to do the same.

The following is more of a general description how to install MacPorts and a really nice initial Python 2.7 install with some useful packages. This procedure is best done as an Administrator (http://macs.about.com/od/switchersnewusers/qt/adminuseracct.htm)

1.) First install the latest and greatest Xcode -> https://developer.apple.com/xcode/ . This is needed because MacPorts needs some compilers to install packages.

2.) If Xcode is installed you need to download the 'command line tools' (which should be installed by default in my opinion! Without it your computer isn't a computer but a dumb device!). You can instal the 'command line tools' in several ways. I find the terminal route the most convenient. Open up a Terminal window (Application > Utilities > Terminal.app). Type

$ xcode-select --install

in the Terminal window (without the $).

If you installed an update for Xcode recently, it is sometimes necassary to 'refresh' the license agreement. Type

$ sudo xcodebuild -license

In the Terminal window. You will be asked to provide a Administrator password. It won't show up in the Terminal as you type (you can't even see you typing!). This can be confusing and you really need to concentrate typing the password correctly.

3.) Install the MacPort for your System version (https://www.macports.org/install.php)

4.) If that is installed you can begin to install a fresh (and more standards compliant) Python 2.7 on your system

First update MacPorts. Type

$ sudo port -v selfupdate

In a Terminal window.

5.) Then install Python 2.7

$ sudo port install python27

And the necessary pySerial packages

$ sudo port install py27-serial

Optional but highly recommended is to install the following packages

$ sudo port install py27-matplotlib py27-numpy py27-scipy py27-ipython py27-game

Pip is always handy (https://pypi.python.org/pypi/pip)

$ sudo port install py27-pip

And for the people that want to delve deeper in serious Python development. (After you set the Python version!! Step 6.)

$ pip install virtualenv

6.) Now we need to set the MacPort Python version as the version we want to use on our system

$ port select --list python

If everything was installed right, you will be shown a list of all the Python version on your system. Versions with -apple in there name are the system installments. We want to set the MacPorts version.

$ port select --set python python27

Type

$ port select --list python

again to check if the version was changed (will have (active) after it)

If for any reason your installation failed (got interrupted or something) try this

$ sudo port clean --all -f py27-aplpy

before -> (https://guide.macports.org/chunked/installing.macports.uninstalling.html) and trying again.

Another nice command to know is

$ port search

After search, type in a Python packages you want to install and it will find the name of the equivalent MacPorts package if this exists.

JOB DONE!


Linux

Needs to be written down. For now follow (https://www.python.org/download/)


Window

Needs to be written down. For now follow (https://www.python.org/download/)