Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have several versions of Python installed, some through MacPorts and some directly via the python.org installers. I have modules installed through MacPorts and via PyPI, for the same Python version (3.2.3), but there are no ports for some of the PyPI modules I'd like to use. I tried just copying the files from one site-packages directory to another, but it didn't work. Is there a way to create one "true" centralized location that will accept packages from both MacPorts and pip/easy_install?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Just use easy_install or pip from macports ie sudo port install py32-pip This will put pip in /opt/local/bin I think and use this pip not the Apple supplied one.

share|improve this answer
    
Mark, thanks for the answer. Basically what I'm looking for is this: I'm trying to do work with Biopython, which requires the numerical libraries Numpy and Scipy. MacPorts has packages for numpy and scipy for python 3.2.3, and they build fine, with the other associated stuff. However, I can't for the life of me install Numpy or Scipy into a fresh python.org installation of either 3.2.3 or 3.3.0, as the build dies with various compiler errors. I've updated every library I can find, but no use. Is there any way to associate the MacPort numpy, etc. with the python.org 3.2.3 installation? –  MattDMo Nov 26 '12 at 22:27
    
@MattDMo - possibly as as they are the same version - however why, doesn't the macports python provides all you need. ALso your problem with the build dying with compiler errors is exactly the reason I use macports python, the porters have fixed/worked round the compiler errors –  Mark Nov 27 '12 at 12:43
    
I'm a nerd, so I always want the latest and greatest :) Seriously, though, I'm trying to figure out how all the files relate to each other through the different versions, and how I might be able to include modules from one installation in programs running in another. Is there a place where $PYTHONPATH is declared, so I can modify it? Also, have you had luck importing say a 3.2 module in 3.3, or vice versa? –  MattDMo Nov 27 '12 at 19:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.