473,581 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OS X install confusion

Hi Groupies,

I have an Intel Macbook running OS X 10.4.

It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.

When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.

My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?

Thanks for bringing light to my ignorance.

JF
Jun 14 '07 #1
6 1781
John Fisher wrote:
Hi Groupies,

I have an Intel Macbook running OS X 10.4.

It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.

When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.

My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?

Thanks for bringing light to my ignorance.

JF
Sounds like a path problem. Apple's system Python is installed in
/usr/bin. Your installation is probably in /usr/local/bin. Edit your
profile or use the full path.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
Jun 14 '07 #2
Ted
On Jun 14, 1:31 pm, Kevin Walzer <k...@codebykev in.comwrote:
John Fisher wrote:
Hi Groupies,
I have an Intel Macbook running OS X 10.4.
It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.
When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.
My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?
Thanks for bringing light to my ignorance.
JF

Sounds like a path problem. Apple's system Python is installed in
/usr/bin. Your installation is probably in /usr/local/bin. Edit your
profile or use the full path.

--
Kevin Walzer
Code by Kevinhttp://www.codebykevin .com
The default python on tiger (2.3.5) is sym-linked to /usr/bin/python
and /usr/bin/pythonw.

I found it easier to relink to the new installation path. This also
leaves /usr/bin/python23 and /usr/bin/pythonw23 still linked to the
original version if you want to quickly check something.

Cheers,
Ted

Jun 14 '07 #3
Ted <te*******@gmai l.comwrote:
On Jun 14, 1:31 pm, Kevin Walzer <k...@codebykev in.comwrote:
John Fisher wrote:
Hi Groupies,
I have an Intel Macbook running OS X 10.4.
It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.
When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.
My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?
Thanks for bringing light to my ignorance.
JF
Sounds like a path problem. Apple's system Python is installed in
/usr/bin. Your installation is probably in /usr/local/bin. Edit your
profile or use the full path.

--
Kevin Walzer
Code by Kevinhttp://www.codebykevin .com

The default python on tiger (2.3.5) is sym-linked to /usr/bin/python
and /usr/bin/pythonw.

I found it easier to relink to the new installation path. This also
leaves /usr/bin/python23 and /usr/bin/pythonw23 still linked to the
original version if you want to quickly check something.

Cheers,
Ted
OK, please give a little more information how I can accomplish this
"re-link".

Thanks,

JF
Jun 15 '07 #4
John Fisher wrote:
Ted <te*******@gmai l.comwrote:
>On Jun 14, 1:31 pm, Kevin Walzer <k...@codebykev in.comwrote:
>>John Fisher wrote:
Hi Groupies,
I have an Intel Macbook running OS X 10.4.
It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.
When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.
My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?
Thanks for bringing light to my ignorance.
JF
Sounds like a path problem. Apple's system Python is installed in
/usr/bin. Your installation is probably in /usr/local/bin. Edit your
profile or use the full path.

--
Kevin Walzer
Code by Kevinhttp://www.codebykevin .com
The default python on tiger (2.3.5) is sym-linked to /usr/bin/python
and /usr/bin/pythonw.

I found it easier to relink to the new installation path. This also
leaves /usr/bin/python23 and /usr/bin/pythonw23 still linked to the
original version if you want to quickly check something.

Cheers,
Ted

OK, please give a little more information how I can accomplish this
"re-link".
Your Python 2.5 is likely installed here:

/Library/Frameworks/Python.framewor k/Versions/Current/bin

But OS X comes with a "system Python", version 2.3.5, likely installed here:

/usr/bin

If you look at /usr/bin, you'll see:

lrwxr-xr-x 1 root wheel 9 Jan 31 17:24 python -python2.3
lrwxr-xr-x 1 root wheel 72 Jan 31 17:24 python2.3 ->
.../../System/Library/Frameworks/Python.framewor k/Versions/2.3/bin/python
lrwxr-xr-x 1 root wheel 10 Jan 31 17:24 pythonw -pythonw2.3
-rwxr-xr-x 1 root wheel 29704 Aug 19 2006 pythonw2.3

So, python is linked to python2.3, and python2.3 is in turn linked to
/System/Library/Frameworks/Python.framewor k/Versions/2.3/bin/python

You need to (warning: watch for line wrap):

sudo -s
<enter your password>
cd /usr/bin
ln -s /Library/Frameworks/Python.framewor k/Versions/Current/bin/python
python_current
ln -s /Library/Frameworks/Python.framewor k/Versions/Current/bin/pythonw
pythonw_current
rm python
rm pythonw
ln -s python python_current
ln -s pythonw pythonw_current

However, that isn't what I did. I like the system being able to find and
use the system-installed python, but I like my scripts to use the python
version I installed (2.5). To get that, skip the above symlinking and
instead edit your .bash_profile file (hidden file inside your home
directory) and put these lines at the top:

PATH="/Library/Frameworks/Python.framewor k/Versions/Current/bin:${PATH}
export PATH

--
pkm ~ http://paulmcnett.com
Jun 15 '07 #5
On Jun 14, 11:21 am, johnmfis...@com cast.net (John Fisher) wrote:
Hi Groupies,

I have an Intel Macbook running OS X 10.4.

It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.

When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.

My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?

Thanks for bringing light to my ignorance.

JF
Strange. I installed macpython 2.4.4 on an imac this year, and when I
type python on the command line of a bash shell, python 2.4.4 starts
up:

$ python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
>>>

I looked in:

/System/Library/Frameworks/Python.framewor k/Versions/Current/bin/

and inside that directory are the programs:

idle
pydoc
python
python2.3

So I tried typing python2.3 on the command line, and lo and behold
python 2.3.5 started up:

$ python2.3
Python 2.3.5 (#1, Jul 25 2006, 00:38:48)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
>>>
So it looks like the macpython install changed the name of the pre-
installed python program from python to python2.3. What do you see in
that directory?
Jun 15 '07 #6
On Jun 14, 6:25 pm, Paul McNett <p...@ulmcnett. comwrote:
John Fisher wrote:
Ted <tedlan...@gmai l.comwrote:
On Jun 14, 1:31 pm, Kevin Walzer <k...@codebykev in.comwrote:
John Fisher wrote:
Hi Groupies,
I have an Intel Macbook running OS X 10.4.
It came installed with Python 2.3.5. I have since installed MacPython
with version 2.4.4, cool.
When I open a bash terminal session and type python, it brings up
version 2.3.5. If I type IDLE it brings up version 2.4.4.
My question: what do I have to do to get it to bring up 2.4.4 with the
"python" command?
Thanks for bringing light to my ignorance.
JF
Sounds like a path problem. Apple's system Python is installed in
/usr/bin. Your installation is probably in /usr/local/bin. Edit your
profile or use the full path.
>--
Kevin Walzer
Code by Kevinhttp://www.codebykevin .com
The default python on tiger (2.3.5) is sym-linked to /usr/bin/python
and /usr/bin/pythonw.
I found it easier to relink to the new installation path. This also
leaves /usr/bin/python23 and /usr/bin/pythonw23 still linked to the
original version if you want to quickly check something.
Cheers,
Ted
OK, please give a little more information how I can accomplish this
"re-link".

Your Python 2.5 is likely installed here:

/Library/Frameworks/Python.framewor k/Versions/Current/bin

But OS X comes with a "system Python", version 2.3.5, likely installed here:

/usr/bin

If you look at /usr/bin, you'll see:

lrwxr-xr-x 1 root wheel 9 Jan 31 17:24 python -python2.3
lrwxr-xr-x 1 root wheel 72 Jan 31 17:24 python2.3 ->
../../System/Library/Frameworks/Python.framewor k/Versions/2.3/bin/python
lrwxr-xr-x 1 root wheel 10 Jan 31 17:24 pythonw -pythonw2.3
-rwxr-xr-x 1 root wheel 29704 Aug 19 2006 pythonw2.3

So, python is linked to python2.3, and python2.3 is in turn linked to
/System/Library/Frameworks/Python.framewor k/Versions/2.3/bin/python

You need to (warning: watch for line wrap):

sudo -s
<enter your password>
cd /usr/bin
ln -s /Library/Frameworks/Python.framewor k/Versions/Current/bin/python
python_current
ln -s /Library/Frameworks/Python.framewor k/Versions/Current/bin/pythonw
pythonw_current
rm python
rm pythonw
ln -s python python_current
ln -s pythonw pythonw_current

However, that isn't what I did. I like the system being able to find and
use the system-installed python, but I like my scripts to use the python
version I installed (2.5). To get that, skip the above symlinking and
instead edit your .bash_profile file (hidden file inside your home
directory) and put these lines at the top:

PATH="/Library/Frameworks/Python.framewor k/Versions/Current/bin:${PATH}
export PATH

--
pkm ~http://paulmcnett.com
When I installed macpython 2.4.4, I think the install automatically
changed the file: Users/me/.bash_profile. Here is what is says at the
bottom of .bash_profile:

# Setting PATH for MacPython 2.5 (these lines added by install)
# The orginal version is saved in .bash_profile.p ysave
PATH="/Library/Frameworks/Python.framewor k/Versions/Current/bin:$
{PATH}"
export PATH
(Note I installed macpython 2.4.4 but the comment says something about
python 2.5.)

Ahh, I think I know what happened to the op's install. I don't think
imacs come with the file: Users/me/.bash_profile. I had previously
created the .bash_profile file in order to alter the bash prompt, so
when I installed macpython 2.4.4, the install modified the pre-
existing .bash_profile file and added the lines listed above. I bet
the op didn't have a .bash_profile file on his system, so the install
didn't make the path changes for him/her.

Jun 15 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4373
by: Mike | last post by:
I have a win2K server that runs my web sites. I need to use ASP.net on one of my sites. I am just learning about ASP.net and found that I cannot run ASP.net formated pages on my server the way that it is. If I am not mistaken, I need to install ASP.NET 1.1 Is this correct? If so, will all of my other sites that use ASP still work the...
2
431
by: Olaf Baeyens | last post by:
For a long time I did not understand the problems users had to install the ..NET framework, and why they complained that it was so hard, but then I saw a user doing this, and I finally understood why. The problem is this: I created a .NET program, I created a setup.msi program that tests for the .NET framework and direct you to a download...
2
1752
by: KennethBohman | last post by:
Hi everybody, Question: how can I use the executable.config-files during installation? The answer might seem obvious, but there is apparently more to it! My itention was, as part of the iinstallation, to write write two settings to the .config file for the executable. I don't usually do that, but for such a small application I thought it...
1
3158
by: Richard Lewis Haggard | last post by:
I'm having a problem with what appears to be some sort of confusion with references. I have a single solution with a dozen projects which has been working quite nicely for a while. The references between projects in the solution were established through project references, not by browsing to an assembly DLL. All of the projects are strongly...
5
1780
by: David C. Ullrich | last post by:
Would there be issues (registry settings, environment variables, whatever) if a person tried to install versions 1.x and 2.x simultaneously on one Windows system? Windows 98, if it matters. (I can handle the file associations with no problem.) Thanks. **************************
5
1147
by: phaniva | last post by:
Hi, I have a 2.0 website. I added a web deployment project to it. I also created a setup project to generate msi file. On my IIS I have both asp ..net 1.1 and 2.0. The virtual directory created by setup is using asp ..net 1.1. I had to manually change asp .net version after install for the website to work. How do I configure this in the...
6
5738
by: globalrev | last post by:
type "python setup.py install" that is used in most "addons" for python. well using windows vista, where the h*** am i supposed to type this? if it is not doable in windows, what do i have to do instead? just clicking the setup.py-file never works.
4
3694
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all, I continue with installation. I create three windows services. Each service has a Installer class.
10
1415
by: zubair1 | last post by:
Howdy :) I can't seem to figure out some problems - 1st is that i can't seem to get notifications of replys when people reply to my thread/post :( why is not :( i have already set Instant Email Notifications in the options page :( Now, something more confusing - I had a question regarding SQL - i have never used it before but i do have...
0
7860
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8139
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8166
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6546
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5667
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5357
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1398
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.