I did delete the *.pyc files in the system directories, and they have now 
reappeared

I've also edited the coot wrapper to remove the system directories as suggested 
by Bill.

All seems to work now

thanks to everybody
Phil

On 4 May 2011, at 15:29, Ben Eisenbraun wrote:

> On Wed, May 04, 2011 at 01:16:29PM +0100, Paul Emsley wrote:
>> On 04/05/11 13:11, Phil Evans wrote:
>>> Is that dangerous?
>> 
>> Not really, python makes the pyc files again (I understand).
> 
> Yes, but you're deleting compiled python objects from _system_ directories,
> and since normal users can't write to those directories, they will be
> recompiled and then thrown away every time python is run and those modules
> are imported.
> 
>>> If I move it I then get
>>> 
>>> ImportError: Bad magic number in 
>>> /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.pyc
>>> 
>>> after moving that I then get
>>> 
>>> ImportError: Bad magic number in 
>>> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/os.pyc
>>> 
>>> and so on I guess
> 
> The problem is probably the PYTHONPATH setting in the coot wrapper script.
> If you're using a recent Fink/Bill Scott build of Coot, then it is using
> Python 2.7, and putting the 2.5 and 2.6 directories in the PYTHONPATH
> causes the interpreter to barf on start up.
> 
> There was a discussion about this on the CCP4bb a couple months ago:
> 
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A1=ind1103&L=CCP4BB#25
> 
> -ben
> 
> --
> | Ben Eisenbraun
> | SBGrid Consortium                          | http://sbgrid.org       |
> | Harvard Medical School                     | http://hms.harvard.edu  |

Reply via email to