<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi again, <div><br></div><div>Thanks for the detailed answer. I think I figure out the problem. </div><div><br></div><div>Here are the steps that I have followed. </div><div><br></div><div>So I have installed MacPort-1.9.2-10.6.dmg</div><div><br></div><div>and this is the directory structure after installation </div><div><br></div><div>--------------------------</div><div><div>salman-zubair-toors-computer:local salmantoor$ pwd </div><div>/opt/local</div><div>salman-zubair-toors-computer:local salmantoor$ ls</div><div>bin<span class="Apple-tab-span" style="white-space:pre"> </span>etc<span class="Apple-tab-span" style="white-space:pre"> </span>include<span class="Apple-tab-span" style="white-space:pre"> </span>lib<span class="Apple-tab-span" style="white-space:pre"> </span>libexec<span class="Apple-tab-span" style="white-space:pre"> </span>man<span class="Apple-tab-span" style="white-space:pre"> </span>sbin<span class="Apple-tab-span" style="white-space:pre"> </span>share<span class="Apple-tab-span" style="white-space:pre"> </span>src<span class="Apple-tab-span" style="white-space:pre"> </span>var<span class="Apple-tab-span" style="white-space:pre"> </span>www </div><div><br></div><div>So you can see no "Library" directory.</div><div><br></div></div><div><div>salman-zubair-toors-computer:bin salmantoor$ sudo port install python24</div><div>.....</div><div>....</div><div><div>---> Staging python24 into destroot</div><div>---> Installing python24 @2.4.6_7</div><div>---> Activating python24 @2.4.6_7</div><div><br></div><div>To fully complete your installation and make python 2.4 the default, please run:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sudo port install python_select</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sudo python_select python24</div><div><br></div><div>---> Cleaning python24</div><div><div>salman-zubair-toors-computer:bin salmantoor$ sudo port install python_select</div><div>---> Fetching python_select</div><div>---> Attempting to fetch select-0.3.tar.gz from <a href="http://lil.fr.distfiles.macports.org/python_select">http://lil.fr.distfiles.macports.org/python_select</a></div><div>---> Verifying checksum(s) for python_select</div><div>---> Extracting python_select</div><div>---> Configuring python_select</div><div>---> Building python_select</div><div>---> Staging python_select into destroot</div><div>---> Installing python_select @0.3_0</div><div>---> Activating python_select @0.3_0</div><div>---> Cleaning python_select</div><div><div>salman-zubair-toors-computer:bin salmantoor$ sudo python_select python24</div><div>Selecting version "python24" for python</div><div>ln: /opt/local/Library/Frameworks/Python.framework/Versions/Current: No such file or directory</div><div>ln: /opt/local/Library/Frameworks/Python.framework/Headers: No such file or directory</div><div>ln: /opt/local/Library/Frameworks/Python.framework/Resources: No such file or directory</div><div>ln: /opt/local/Library/Frameworks/Python.framework/Python: No such file or directory</div><div>there were 4 errors selecting version "python24"!</div></div></div></div><div><br></div><div>These are the error messages. </div><div>-----------------------------------------</div><div><br></div><div>In fact it install python24 in /opt/local (lib and bin). I think python should be installed in /opt/local/Library/Frameworks/Python.framework/Version/2.4 which was not the case.</div><div><br></div><div>But then I try to install python27 the system create all the desired paths /opt/local/Library/Frameworks/Python.framework/Version/2.7/ </div><div><br></div><div>as now if I say </div><div><br></div><div><div>salman-zubair-toors-computer:bin salmantoor$ sudo ./python_select python27</div><div>Password:</div><div>Selecting version "python27" for python</div><div>or </div><div>salman-zubair-toors-computer:bin salmantoor$ sudo ./python_select python24</div><div>Selecting version "python24" for python</div><div><br></div><div>didn't get any error message. So I think python24 is quite old and the directory structure is for new versions of the python. </div><div><br></div><div>Is this explanation is correct or I am missing some important point?</div><div><br></div><div><br></div></div><div>Regards..</div><div>Salman. </div><div><br></div><div> </div><div><br></div><div><br></div><div> </div><div><br></div><div><br><div><div>On Feb 18, 2011, at 8:57 PM, Jason Swails wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">What problems do you have with python_select? MacPorts should put pythons in /opt/local/Library, but if you don't install any python versions that won't happen. Note that python_select is just a script to choose between different pythons (including the system python).<br>
<br>python_select should be in /opt/local/bin. To take a look at the python versions you have available, use the command<br><br>python_select -l<br><br>You should see something like this:<br><br>username$ python_select -l<br>
Available versions:<br>current none python24 python25 python26 python26-apple python27 python32<br><br>If all you see is python26-apple, that means you haven't installed any other python versions yet. These have to be installed separately from python_select. For example, try installing python27:<br>
<br>sudo port install python27<br><br>Now you should be able to choose between these two versions using python_select. To actually use python_select to change default python versions, just select the version you want to run from the list provided with "-l":<br>
<br>python_select python27<br><br>My last comment -- on Mac, python is installed as a framework, so the vanilla "./configure && make && make install" won't work for its source code. You need additional cflags and compiler options, which is what makes MacPorts so nice.<br>
<br>Hope this helps,<br>Jason<br><br><div class="gmail_quote">On Fri, Feb 18, 2011 at 1:15 PM, Salman Zubair Toor <span dir="ltr"><<a href="mailto:salman.toor@it.uu.se">salman.toor@it.uu.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
Hi,<br>
<br>
I am new to the Macports. I have Snow Leopard and I have installed macports using Macports-1.9.2-10.6.dmg.<br>
<br>
The problem is, after installation it don't have /opt/local/Library directory. When I install python it puts everything in /opt/local/ (I mean in lib and bin directories).<br>
<br>
<br>
macport.conf have<br>
<br>
-----------------<br>
# Directory containing Applications from ports.<br>
applications_dir /Applications/MacPorts<br>
-----------------<br>
<br>
Thats why I think "python_select" fails to set the current version.<br>
<br>
Do I need to specify any flag while installation, which install things in Frameworks?<br>
<br>
I have also tried with the source but with the standard commands (./configure , make, make install) but no luck.<br>
<br>
Regards..<br>
Salman.<br>
<br>
_______________________________________________<br>
macports-users mailing list<br>
<a href="mailto:macports-users@lists.macosforge.org" target="_blank">macports-users@lists.macosforge.org</a><br>
<a href="http://lists.macosforge.org/mailman/listinfo.cgi/macports-users" target="_blank">http://lists.macosforge.org/mailman/listinfo.cgi/macports-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jason M. Swails<br>Quantum Theory Project,<br>University of Florida<br>Ph.D. Candidate<br>352-392-4032<br>
</blockquote></div><br></div></div></body></html>