Mac Development

Please excuse the chaos. This page holds notes made after

  • downloading, onto Leopard, gnumed-client 0.5.rc5
  • installing Apple's Xcode Tools (from DVD)
  • installing (via postgresqlformac) postgresql-8.3.7
  • installing (via MacPorts) a newer py25-psycopg2 2.0.9
  • installing py25-psycopg2 caused to also be downloaded and installed
    • /Applications/MacPorts/MacPython 2.5 (Python 2.5.4, newer than Mac OS X Leopard system python 2.5.1)
    • an extra ports version of postgresql-8.3

For reference, there is now on the Leopard computer:

/Library/Frameworks/Python.framework/Python
/Library/Frameworks/Python.framework/Versions/2.4/Python
/Library/Frameworks/Python.framework/Versions/Current/Python
/System/Library/Frameworks/Python.framework/Python
/System/Library/Frameworks/Python.framework/Versions/2.3/Python
/System/Library/Frameworks/Python.framework/Versions/2.5/Python
/System/Library/Frameworks/Python.framework/Versions/Current/Python

/opt/local/lib/python2.5/site-packages/psycopg2
/opt/local/var/macports/software/py25-psycopg2
/opt/local/var/macports/software/py25-psycopg2/2.0.9_0+postgresql83/opt/local/lib/python2.5/site-packages/psycopg2 
/opt/local/var/macports/receipts/py25-psycopg2
/opt/local/var/macports/sources/rsync.macports.org/release/ports/python/py25-psycopg2
/opt/local/var/macports/sources/rsync.macports.org/release/ports/python/py26-psycopg2

/opt/local/lib/postgresql83 
/opt/local/share/postgresql83 
/opt/local/include/postgresql83
/opt/local/var/macports/distfiles/postgresql83/postgresql-8.3.7.tar.bz2 
/opt/local/var/macports/receipts/postgresql83
/opt/local/var/macports/software/postgresql83/8.3.7_0/opt/local/share/postgresql83
/opt/local/var/macports/software/postgresql83/8.3.7_0/opt/local/lib/postgresql83
/opt/local/var/macports/software/postgresql83/8.3.7_0/opt/local/include/postgresql83
/opt/local/var/macports/sources/rsync.macports.org/release/ports/java/postgresql-jdbc 
/opt/local/var/macports/sources/rsync.macports.org/release/ports/python/py-postgresql-exception
/opt/local/var/macports/sources/rsync.macports.org/release/ports/databases/postgresql84

I did run check-prerequisites.sh and I got what is appended further down (after the Adjusting PYTHONPATH ... stuff) and my questions are:

1) are the "line 48" and "line 50" problems in any way related to being run on release candidates? What action is required if it ought to be resolved?

2) when sys.path seems to find only
     /Library/Frameworks/Python.framework/Versions/2.4
but py25-psycopg2 2.0.9 needs python 2.5, does this mean

a) does check-prerequisites and GNUmed scripts needs to be smarter on Mac to find 2.5? 

b) do I need a symlink and if so, what? Based on http://wiki.python.org/moin/MacPython/Leopard is it a directory or the application that is to be pointed to?
   cd /Library/Frameworks
   sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.5

c) do I need to somewhere change a PATH as per maybe
http://groups.google.com/group/wxpython-mac/browse_thread/thread/e272b75b4fdeb56f/663284e8d2a08a4c?lnk=raot
or some hack like
import sys ; sys.path.insert


d) should some combination of the above fix why I cannot ./gm-from-vcs.sh on account of getting the following:

Adjusting PYTHONPATH ...
,========================================================
| Unhandled exception caught !
| Type : exceptions.ImportError
| Value: No module named errorcodes
`========================================================
Traceback (most recent call last):
  File "wxpython/gnumed.py", line 473, in ?
    from Gnumed.pycommon import gmPG2
  File "/Users/mom/Downloads/GNUmed-0.5.rc5/Gnumed/pycommon/gmPG2.py", line 65, in ?
    import psycopg2.errorcodes as sql_error_codes
ImportError: No module named errorcodes
study-iMac:client mom$ 


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Below what I get from check-prerequisites:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

study-iMac:client mom$ ./check-prerequisites.sh
-------------------------------------------------------------
This script will check your environment for applications
and services the GNUmed client depends on.

Please make sure to also read the INSTALL and README files.
-------------------------------------------------------------

You need to be able to connect to a PostgreSQL
server. It is, however, non-trivial to reliably
test for that.
If you want to work with a *local* database (on this
machine) you should see at least one process saying
'postgres' in the following list.
If you don't you can still use our public database
at publicdb.gnumed.de for testing or connect to a
GNUmed database installed on another machine.

Process list:
-------------------------------------------------------------------------
  145   ??  S      0:00.11 /Library/PostgreSQL8/bin/postgres -D /Library/PostgreSQL8/data -i
  147   ??  Ss     0:00.32 postgres: writer process                                                                                                                                                                                                                                                                                               
  148   ??  Ss     0:00.23 postgres: wal writer process                                                                                                                                                                                                                                                                                          
  149   ??  Ss     0:00.06 postgres: autovacuum launcher process                                                                                                                                                                                                                                                                                  
  150   ??  Ss     0:00.05 postgres: stats collector process                                                                                                                                                                                                                                                                                     
  220   ??  Ss     0:07.17 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid 4B3B9A80-2B02-4238-B575-9DDF2C2E84B9 -post-exec
-------------------------------------------------------------------------

=> checking for Python interpreter ...
=> found
./check-prerequisites.sh: line 48: cd: gnumed: Not a directory
./check-prerequisites.sh: line 50: cd: OLDPWD not set

Press <RETURN> key to continue.
-------------------------------

-------------------------------
Checking for Python modules
===========================
 mx.DateTime... found
 enchant... 
  ERROR: 'enchant' not installed
  ERROR: this is used to handle spellchecking
 psycopg2... found
 wx(version)... found
  selecting unicode enabled version >= 2.8... success
 wx(python)... found
 uno... 
  ERROR: uno not installed
  INFO : this is needed for form and letter handling
  INFO : GNUmed will work but you will be unable
  INFO : to use OpenOffice to write letters and
  INFO : fill in forms
 Gnuplot... 
  ERROR: Gnuplot python binding not installed
  INFO : this is needed for data visualization
  INFO : GNUmed will work but you will be unable
  INFO : to visualize search results and lab data
 GNUmed Python modules... 
  ERROR: GNUmed's own Python modules not installed site-wide
  INFO : these handle most of the work in GNUmed
  INFO : it may still be possible to run GNUmed locally
  INFO : from a directory containing a CVS tree
 twain... 
  ERROR: twain not installed
  INFO : this is needed to access scanners on Windows
  INFO : GNUmed will work but you will be unable to
  INFO : scan if you are on a Windows machine

sys.path is currently set as follows:
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.8-mac-unicode
  /Users/mom/Downloads/GNUmed-0.5.rc5/client
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python24.zip
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-darwin
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/lib-scriptpackages
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PIL

-------------------------------------------------
I will now check for a few utilities which
make working with GNUmed more productive but
are not strictly required for standard operation.
Press <RETURN> key to continue.
-------------------------------
 'file' command... found
 'extract' command... 
  INFO : You don't seem to have the 'extract' command installed.
  INFO : It is available with your OS. On Windows it is not needed.
 'Aeskulap' DICOM viewer... 
  INFO : You don't seem to have the 'aeskulap' command installed.
  INFO : It is available with your OS. On Windows it is not needed.
 'AMIDE' DICOM viewer... 
  INFO : You don't seem to have the 'amide' command installed.
  INFO : It is available with your OS. On Windows it is not needed.
 'XMedCon' DICOM viewer... 
  INFO : You don't seem to have the 'xmedcon' command installed.
  INFO : It is available with your OS. On Windows it is not needed.
 'XSane' scanner frontend... 
  INFO : You don't seem to have the 'xsane' command installed.
  INFO : It is available with your OS. On Windows it is not needed.
 'aspell' spell checker... 
  INFO : You don't seem to have the 'aspell' command installed.
  INFO : It is available with your OS.
 'konsolekalender' KOrganizer controller... 
  INFO : You don't seem to have the 'konsolekalendar' command installed.
  INFO : It is available with your OS.
 'gnuplot' command... 
  INFO : You don't seem to have the 'gnuplot' command installed.
  INFO : It is available with your OS or can be downloaded from the web.
study-iMac:client mom$

Topic revision: 23 Jan 2014, KarstenHilbert
 
Download.png
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark