gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Does bootstrapping / upgrading databases sometimes ne


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] Does bootstrapping / upgrading databases sometimes need mxDateTime ?
Date: Sun, 31 Jul 2011 10:03:12 +0200
User-agent: KMail/1.13.7 (Linux/2.6.38.4-23-default; KDE/4.7.0; i686; ; )

On Samstag, 30. Juli 2011 22:17:49 Jim Busser wrote:

> I am wondering whether it is explainable why I ran into problems on Mac

> trying to upgrade my database from

>

> v15 (production)

> to v16 (development)

>

> which, when I tried with postgres from EnterpriseDB I got the error

>

> ImportError: No module named mx.DateTime

>

 

This indicates that mxDateTime is not found. Most likely that happens when it is not installed or when the macports python has not been set to be the default version.

 

I remember that there was a command to switch between python versions and set one a default. I guess this could be tried.

 

Use python_select.


$ sudo port install python_select
...
$ python_select -l
Available versions:
current none python25 python26 python26-apple python31

> however it was fixable when I changed my path from EnterpriseDB postgres to

> MacPorts

>

> /opt/local/lib/postgresql84/bin

>

 

I cannot think of a reason why that would matter. It does for psycopg2 but not for mxDateTime as far as I know. I believe the bootstrap script tries to pick the wrong python installation.

>

> I should maybe point out that:

>

> ********************************

> 1) my computer has on it

>

> /opt/local/var/macports/software/py26-mx-base

>

> however that is accessible (presumably) from the python… since the upgrade

> worked without the above being in my successful $PATH:

>

> /opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versio

> ns/Current/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/opt/local/lib/

> postgresql84/bin

>

> ***********************************************

>

> 2) there are no binaries in

>

> /opt/local/lib/postgresql84/bin

>

> which were not also present in EnterpriseDB which was in my previous path:

>

> /Library/PostgreSQL/8.4/bin/

>

> in fact, the latter has everything that is in

> /opt/local/lib/postgresql84/bin *plus* also these extras:

>

> pltcl_listmod

> pltcl_loadmod

> pg_standby

> pgbench

> oid2name

> pltcl_delmod

>

Cannot comment on the above due to not having access to a Mac. However I once did have access to an installation that had PG from Macports and EnterpriseDB. I only remember that bootstraping worked without fiddling with the path.

 

You can try to find out which (in which directory) python is called by the upgrade script. Then manually start that python binary and try

 

import mx.DateTime

 

If that works then all should be set.

 

Good luck.

 

Sebastian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]