Changes between Initial Version and Version 1 of Ticket #31891


Ignore:
Timestamp:
Nov 4, 2011, 3:31:13 PM (12 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31891 – Description

    initial v1  
    11I'm having an issue where python scripts are loading the system numpy version instead of the MacPorts compiled version, this leads to the following error message:
    22
     3{{{
    34RuntimeError: module compiled against API version 6 but this version of numpy is 4
     5}}}
    46
    57and in some cases (e.g. scripts that use matplotlib) causes crashes.
     
    911The fix so far seems to be to add the following code to the top of each script before loading numpy:
    1012
     13{{{
    1114sys.path.reverse()
     15}}}
    1216
    1317but this is extremely kludgy fix, and I never had to previously do this. My PYTHONPATH variable points to my local python repository and to the MacPorts site-packages directory only. Is there somewhere else I can tell python to stop loading stuff from /System/Library/Frameworks/Python.framework?