Thank you in advance for the advice!
Background:
Relative to the people on this site I'm new to programming, and despite some research I'm not familiar with using Unix-type shells, with what managing packages really involves, or with anything which is done outside of the "Dr. Java" IDE or default R GUI. I have a late-2008 macbook with OSX 10.5.8
My Goal:
I'm trying to get the following packages installed in Python: scipy, numpy, matplotlib, networkX
My Story:
From what I understand my 10.5.8 comes installed with a Python 2.5, which the system needs for its functioning, and you really shouldn't mess with. The packages I installed require Python 2.7, so after reformatting my machine, I installed Python 2.7.2 for OSX 10.3 (the latest Python/OSX that was offered of 2.7.X) using the .dmg off of the Python website. Then, I installed XCode using the .dmg (appropriate version for my OS) off of the Apple site, and installed MacPorts (appropriate version for my OS) using the .dmg off of their site. Then, I believe I used MacPorts to install the packages:
sudo port install py27.numpy
However, when I try to import the packages I've apparently installed, Python tells me they don't exist. I'm pretty sure I have only 2 versions of Python on my machine, 2.5 for OSX and 2.7.2 for me (how do I check this?), and if I check which version of Python is running, whether through the Shell or through the IDLE, I get:
>>> import sys
>>> print sys.version
2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 14:13:39)
[GCC 4.0.1 (Apple Inc. build 5493)]
If I run "which python" i get:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
When I check where MacPorts installed the packages using
port contents py27-packagename
I get directories mostly in:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
with a few directories in
/opt/local/share/py27-matplotlib/examples/
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/share/doc/networkx-1.5/
and one directory each in
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/f2py
/opt/local/share/doc/py27-matplotlib/CHANGELOG
/opt/local/share/doc/py27-matplotlib/README.txt
/opt/local/share/doc/py27-matplotlib/TODO
My Question:
How do I get Python to recognize my packages?? Ideally I'd like to set it up so I can use the Python IDLE, as well as invoking it from the command line.
I've tried replicating some of the solutions at: Locate MacPorts package? But I don't really understand what I'm doing all that well so It's difficult to adapt what's being done there.
Thank you again everyone!