Skip to content Skip to sidebar Skip to footer

Install Python 3.1 On Mac Os X Version 10.5.8

I use Windows. I wrote a Python 3.1 script that my Mac-using friend would like to run, but we can't get Python 3.1 to work right on his Mac. I think the problem is that the Python

Solution 1:

Take a look at PythonBrew. It made installing Python on my Mac a lot easier.

Also this might help:

Is there a Python Equivalent of Ruby's RVM?

Solution 2:

Python Launcher.app is a somewhat neglected app; there have been some discussion about removing it all together because it could be somewhat of a security risk if someone downloads arbitrary Python scripts from the web. It can also be kind of hit or miss if you have multiple Python versions installed. And many people just run Python from a terminal window command line so they don't need Python Launcher.app and that's probably the safest thing to do. To do so, you should first run the Update Shell Profile command in /Applications/Python 3.1 which will ensure that the proper Python framework bin directory is added to your shell path. Then you can just type:

$ python3 /path/to/script.py

That said, you can make Python Launcher work by changing the interpreter path to:

/Library/Frameworks/Python.framework/Versions/3.1/bin/python3

but I discourage you from doing so.

Another better GUI option is to launch IDLE.app and drag-and-drop files onto it in the dock or open them in its File menu.

Solution 3:

The versions in /System/Library/Frameworks/Python.framework/... were put there as part of OS X. They should be left alone. (See this question.)

.dmg files downloaded from python.org install to /Library/Frameworks/Python.framework/.... These are user-installed, so you can install/uninstall/move however you like. These installers also created symlinks in /usr/local/bin.

You can add either /Library/.../3.1/bin or /usr/local/bin to your path in your shell if you want python3 to be on your path.

Post a Comment for "Install Python 3.1 On Mac Os X Version 10.5.8"