Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29004 > unrolled thread

conflicting installations of python

Started byazandi <azandi@adconion.com>
First post2012-09-12 16:44 -0700
Last post2012-09-12 21:36 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  conflicting installations of python azandi <azandi@adconion.com> - 2012-09-12 16:44 -0700
    Re: conflicting installations of python Ned Deily <nad@acm.org> - 2012-09-12 20:06 -0700
      Re: conflicting installations of python azandi@adconion.com - 2012-09-12 21:36 -0700
        Re: conflicting installations of python Ned Deily <nad@acm.org> - 2012-09-12 22:55 -0700
      Re: conflicting installations of python azandi@adconion.com - 2012-09-12 21:36 -0700

#29004 — conflicting installations of python

Fromazandi <azandi@adconion.com>
Date2012-09-12 16:44 -0700
Subjectconflicting installations of python
Message-ID<da05ab8f-dbb4-4f23-8cbc-6b9a7b4f62e9@googlegroups.com>
I installed python 2.7.3 using macports on Lion, and used port select python python27. However python version still shows 2.7.1.

Any ideas why is that happenning? And how to fix it?

Thanks in advance,

[toc] | [next] | [standalone]


#29011

FromNed Deily <nad@acm.org>
Date2012-09-12 20:06 -0700
Message-ID<mailman.590.1347505618.27098.python-list@python.org>
In reply to#29004
In article <da05ab8f-dbb4-4f23-8cbc-6b9a7b4f62e9@googlegroups.com>,
 azandi <azandi@adconion.com> wrote:

> I installed python 2.7.3 using macports on Lion, and used port select python 
> python27. However python version still shows 2.7.1.
> 
> Any ideas why is that happenning? And how to fix it?

Macports installs its ports into a separate root.  You need to ensure 
that the macports bin directory comes first on your shell search path;  
by default, it is /opt/local/bin.  Try something like this:

    export PATH=/opt/local/bin:$PATH

Otherwise, use an alias or an absolute path:

    /opt/local/bin/python

-- 
 Ned Deily,
 nad@acm.org

[toc] | [prev] | [next] | [standalone]


#29013

Fromazandi@adconion.com
Date2012-09-12 21:36 -0700
Message-ID<fd1894aa-2a5a-42ca-b9db-60a343d6d910@googlegroups.com>
In reply to#29011
Hi Ned, 

Thanks for your response, I think the path is fine, since which python outputs the location where macports should install python i.e. /opt/local/bin/python.

also 

port list active | fgrep python
python27                       @2.7.3          lang/python27

and

port location python27

Port python27 2.7.3_0 is installed as an image in:
/opt/local/var/macports/software/python27/python27-2.7.3_0.darwin_11.x86_64.tbz2


Another problem caused by this installation is that somehow it removes os.urandom module:

>>> import os
>>> os.urandom
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'urandom'


On Wednesday, September 12, 2012 8:07:43 PM UTC-7, Ned Deily wrote:
> In article <da05ab8f-dbb4-4f23-8cbc-6b9a7b4f62e9@googlegroups.com>,
> 
>  azandi <azandi@adconion.com> wrote:
> 
> 
> 
> > I installed python 2.7.3 using macports on Lion, and used port select python 
> 
> > python27. However python version still shows 2.7.1.
> 
> > 
> 
> > Any ideas why is that happenning? And how to fix it?
> 
> 
> 
> Macports installs its ports into a separate root.  You need to ensure 
> 
> that the macports bin directory comes first on your shell search path;  
> 
> by default, it is /opt/local/bin.  Try something like this:
> 
> 
> 
>     export PATH=/opt/local/bin:$PATH
> 
> 
> 
> Otherwise, use an alias or an absolute path:
> 
> 
> 
>     /opt/local/bin/python
> 
> 
> 
> -- 
> 
>  Ned Deily,
> 
>  nad@acm.org

[toc] | [prev] | [next] | [standalone]


#29015

FromNed Deily <nad@acm.org>
Date2012-09-12 22:55 -0700
Message-ID<mailman.593.1347515770.27098.python-list@python.org>
In reply to#29013
In article <fd1894aa-2a5a-42ca-b9db-60a343d6d910@googlegroups.com>,
 azandi@adconion.com wrote:
> Thanks for your response, I think the path is fine, since which python 
> outputs the location where macports should install python i.e. 
> /opt/local/bin/python.
> 
> also 
> 
> port list active | fgrep python
> python27                       @2.7.3          lang/python27
> 
> and
> 
> port location python27
> 
> Port python27 2.7.3_0 is installed as an image in:
> /opt/local/var/macports/software/python27/python27-2.7.3_0.darwin_11.x86_64.tb
> z2

None of the above actually shows what is being executed when you type 
python.  What is the output from the following commands?

    which python
    ls -l $(which python)
    python
    
> Another problem caused by this installation is that somehow it removes 
> os.urandom module:
> 
> >>> import os
> >>> os.urandom
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'urandom'

Looks like you are using a broken Python installation.

-- 
 Ned Deily,
 nad@acm.org

[toc] | [prev] | [next] | [standalone]


#29014

Fromazandi@adconion.com
Date2012-09-12 21:36 -0700
Message-ID<mailman.592.1347510983.27098.python-list@python.org>
In reply to#29011
Hi Ned, 

Thanks for your response, I think the path is fine, since which python outputs the location where macports should install python i.e. /opt/local/bin/python.

also 

port list active | fgrep python
python27                       @2.7.3          lang/python27

and

port location python27

Port python27 2.7.3_0 is installed as an image in:
/opt/local/var/macports/software/python27/python27-2.7.3_0.darwin_11.x86_64.tbz2


Another problem caused by this installation is that somehow it removes os.urandom module:

>>> import os
>>> os.urandom
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'urandom'


On Wednesday, September 12, 2012 8:07:43 PM UTC-7, Ned Deily wrote:
> In article <da05ab8f-dbb4-4f23-8cbc-6b9a7b4f62e9@googlegroups.com>,
> 
>  azandi <azandi@adconion.com> wrote:
> 
> 
> 
> > I installed python 2.7.3 using macports on Lion, and used port select python 
> 
> > python27. However python version still shows 2.7.1.
> 
> > 
> 
> > Any ideas why is that happenning? And how to fix it?
> 
> 
> 
> Macports installs its ports into a separate root.  You need to ensure 
> 
> that the macports bin directory comes first on your shell search path;  
> 
> by default, it is /opt/local/bin.  Try something like this:
> 
> 
> 
>     export PATH=/opt/local/bin:$PATH
> 
> 
> 
> Otherwise, use an alias or an absolute path:
> 
> 
> 
>     /opt/local/bin/python
> 
> 
> 
> -- 
> 
>  Ned Deily,
> 
>  nad@acm.org

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web