Problem running python_select

Salman Zubair Toor salman.toor at it.uu.se
Fri Feb 18 16:34:12 PST 2011


Hi again,

Thanks for the detailed answer. I think I figure out the problem.

Here are the steps that I have followed.

So I have installed MacPort-1.9.2-10.6.dmg

and this is the directory structure after installation

--------------------------
salman-zubair-toors-computer:local salmantoor$ pwd
/opt/local
salman-zubair-toors-computer:local salmantoor$ ls
bin	etc	include	lib	libexec	man	sbin	share	src	var	www

So you can see no "Library" directory.

salman-zubair-toors-computer:bin salmantoor$ sudo port install python24
.....
....
--->  Staging python24 into destroot
--->  Installing python24 @2.4.6_7
--->  Activating python24 @2.4.6_7

To fully complete your installation and make python 2.4 the default,  
please run:
	sudo port install python_select
	sudo python_select python24

--->  Cleaning python24
salman-zubair-toors-computer:bin salmantoor$ sudo port install  
python_select
--->  Fetching python_select
--->  Attempting to fetch select-0.3.tar.gz from http://lil.fr.distfiles.macports.org/python_select
--->  Verifying checksum(s) for python_select
--->  Extracting python_select
--->  Configuring python_select
--->  Building python_select
--->  Staging python_select into destroot
--->  Installing python_select @0.3_0
--->  Activating python_select @0.3_0
--->  Cleaning python_select
salman-zubair-toors-computer:bin salmantoor$ sudo python_select python24
Selecting version "python24" for python
ln: /opt/local/Library/Frameworks/Python.framework/Versions/Current:  
No such file or directory
ln: /opt/local/Library/Frameworks/Python.framework/Headers: No such  
file or directory
ln: /opt/local/Library/Frameworks/Python.framework/Resources: No such  
file or directory
ln: /opt/local/Library/Frameworks/Python.framework/Python: No such  
file or directory
there were 4 errors selecting version "python24"!

These are the error messages.
-----------------------------------------

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.

But then I try to install python27 the system create all the desired  
paths /opt/local/Library/Frameworks/Python.framework/Version/2.7/

as now if I say

salman-zubair-toors-computer:bin salmantoor$ sudo ./python_select  
python27
Password:
Selecting version "python27" for python
or
salman-zubair-toors-computer:bin salmantoor$ sudo ./python_select  
python24
Selecting version "python24" for python

didn't get any error message. So I think python24 is quite old and the  
directory structure is for new versions of the python.

Is this explanation is correct or I am missing some important point?


Regards..
Salman.







On Feb 18, 2011, at 8:57 PM, Jason Swails wrote:

> 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).
>
> python_select should be in /opt/local/bin.  To take a look at the  
> python versions you have available, use the command
>
> python_select -l
>
> You should see something like this:
>
> username$ python_select -l
> Available versions:
> current none python24 python25 python26 python26-apple python27  
> python32
>
> 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:
>
> sudo port install python27
>
> 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":
>
> python_select python27
>
> 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.
>
> Hope this helps,
> Jason
>
> On Fri, Feb 18, 2011 at 1:15 PM, Salman Zubair Toor <salman.toor at it.uu.se 
> > wrote:
> Hi,
>
> I am new to the Macports. I have Snow Leopard and I have installed  
> macports using  Macports-1.9.2-10.6.dmg.
>
> 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).
>
>
> macport.conf have
>
> -----------------
> # Directory containing Applications from ports.
> applications_dir        /Applications/MacPorts
> -----------------
>
> Thats why I think "python_select" fails to set the current version.
>
> Do I need to specify any flag while installation, which install  
> things in Frameworks?
>
> I have also tried with the source but with the standard commands (./ 
> configure , make, make install) but no luck.
>
> Regards..
> Salman.
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>
>
>
> -- 
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Candidate
> 352-392-4032

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110219/84254d8f/attachment.html>


More information about the macports-users mailing list