Thank you in advance for your advice!
Background:
As for the people on this site, I am new to programming, and despite some research, I am not familiar with the use of Unix shells with which management packs are really associated or with anything that is done outside of the βDr. Javaβ IDE or The default GUI is R. I have a late 2008 macbook with OSX 10.5.8
My goal:
I am trying to install the following packages in Python: scipy, numpy, matplotlib, networkX
My story:
From what I understand, my 10.5.8 comes with Python 2.5, which the system needs to function, and you really shouldn't bother. The packages I installed require Python 2.7, so after reformatting my machine, I installed Python 2.7.2 for OSX 10.3 (the last Python / OSX that 2.7.X suggested) using .dmg from the Python site. Then I installed Xcode using .dmg (the appropriate version for my OS) from the Apple website and installed MacPorts (the corresponding version for my OS) using .dmg off of my site. Then I suggest that I used MacPorts to install packages:
sudo port install py27.numpy
However, when I try to import the packages that I apparently installed, Python tells me that they do not exist. I am sure that I only have 2 versions of Python on my machine, 2.5 for OSX and 2.7.2 for me (how to check this?), And if I check which version of Python is running, whether through Shell or through 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 "what python" I get:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
When I check where MacPorts installed packages using
port contents py27-packagename
I get directories mainly in:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
with multiple 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 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 is:
How do I get Python to recognize my packages? Ideally, I would like to configure it so that I can use Python IDLE and also call it from the command line.
I tried to replicate some of the solutions to: Find the MacPorts package? But I donβt really understand what I am doing so well, so itβs hard to adapt to what is being done there.
Thanks again everyone!