Menu

#7 CAMFR module on OSX

open
nobody
None
5
2014-05-22
2011-11-29
Zach Korth
No

I can't seem to locate the CAMFR module itself, and whenever I run any of the included files (e.g. tutorial1.py), it tells me that there is "no module named camfr".

I am on Mac OS X with the default Python2.5 installation (though I also have 2.6), so I download and installed the "camfr_20070717_py2.5_MacOSX.dmg" file and ran it.

Has anyone else had this problem?

Thanks,
Zach

Discussion

  • Peter Bienstman

    Peter Bienstman - 2011-11-29
    • summary: CAMFR module --> CAMFR module on OSX
     
  • Peter Bienstman

    Peter Bienstman - 2011-11-29

    I'm afraid the OSX installer is no longer supported, the person who contributed it is no longer active in this field.

    Peter

     
  • Zach Korth

    Zach Korth - 2011-11-30

    Thanks for the fast reply. This is a shame. Do you know if there are plans for this to be packaged as either a Fink or MacPorts module? It would be very helpful to be able to use the software on OS X!

     
  • DeminJanu

    DeminJanu - 2014-05-22

    I had this same problem - it was relatively easily remedied.
    The reason is that CAMFR installed into the old python site-packages directory (The Mac OS Installer probably just needs to be updated to fix this).

    To allow the CAMFR package folder to be found by the MacOS python interpreter, the camfr installation folder must be added to the Python Search Path.

    The Mac OS python packages (10.7+ I think) are found at:
    /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/
    (at least that's where some "Extra" packages are located)

    The CAMFR installer places the camfr folder at:
    /Library/Python/2.5/site-packages/camfr/
    (which is why Python2.5 never finds it)

    You could just move the camfr folder into the Mac OS Extras/python folder, but there are actually other Python 2.5 packages that may not know this new location (especially since the CAMFR installer installs other packages).
    So instead I added the "old" site-packages folder to the python path as so:

    I Created a text file at
    /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/site-packages.pth
    (the file can actually be named anything you want - it is a python 'path' file.)

    and the contents of that text file is the absolute path to the folder to be included, so mine just contains the text:
    /Library/Python/2.5/site-packages

    and I left the camfr folder and anything else (for eg. Matplotlib etc.) in the original installation location (ie. left them in the "old" site-packages folder where the installer put them)

    Python2.5 now can find the camfr module. This method has worked on OS 10.7 & 10.8. Unfortunately, upgrading the Mac OS sometimes moves these files around, so you have to re-create/modify the site-packages.pth file.

     

    Last edit: DeminJanu 2014-05-22

Log in to post a comment.