Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== python install ====== ===== python on windows ===== * download python 2.7.x windows installer from https://www.python.org/ * download psycopg2 windows installer from http://initd.org/psycopg/ ===== python on mac ===== * python was already installed on mac, but it was Apple's version * installed macports version of python<code> # to change to macports python... sudo port select --set python python27 # to change back... sudo port select --set python python27-apple </code> <note> psycopg2 and mysql drivers were easily installed with macports using these commands: <code> sudo port install py27-psycopg2 sudo port install py27-mysql </code> however, for the following items, pip was used with apple python to learn how it works; each of these were available on macports and could easily be installed from there </note> ===== pip and postgres driver ===== * install pip and psycopg2 * pip is a package manager for python * download get-pip.py from https://pip.pypa.io/en/latest/installing.html<code> sudo python ~/Downloads/get-pip.py </code> * ''sudo pip install psycopg2'' failed because it couldn't find pg_config * postgres was already installed with macports, so I modified the path<code> export PATH=$PATH:/opt/local/lib/postgresql93/bin </code> * this now worked<code> sudo pip install psycopg2 </code> ===== sqlite ===== * sqlite3 is installed by default with python ===== mysql ===== * mysql was already installed with macports, so I modified the path<code> export PATH=$PATH:/opt/local/lib/mysql55/bin </code> * this now worked<code> sudo pip install MySQL-python </code> ===== view installed modules ===== * ''python'' (starts an interactive python shell) * ''help('modules')'' docs/python/install.txt Last modified: 2014/06/30 22:40by billh