I am using OS X El Capitan and my default Python version is 2.7.10.
How can I change the default version to Python 3.5 for Terminal use?
El Capitan comes bundled with 2.7 and is used internally, so its best you don't do anything with it.
The easiest way is to download the Mac installer,
https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg
Install it by following the steps in the GUI, go to terminal and to start python type,
python3
For Brew, kindly refer to the document,
Installing Python on Mac OS X
It has a step-by-step guide to help you through the entire process of installing python 3.x
Regards.
Leave Python 2.X as it is.
Download Python either from https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg or HomeBrew or via Anaconda from https://www.continuum.io/downloads.
add an alias in your ~/.bash_profile as follows
alias python='python3'
Hope that helped
you can use other answers and update your python version (actually you shouldnt update 2.7 because it makes problems for your applications that uses that version of python) OR
Use
Python3
Because you have it already
for your works like making virtual environments in that version.
My suggestion for you if you want to use different python versions on your system that could be so useful for ML and Data minings is USING
Pyenv
helps you manage you python versions.
Related
I need to know How to install System Python 2.7 on my Mac. This is because, I unknowingly uninstalled it (I thought I was removing the Python I downloaded from Python.org)
I followed this Stack Overflow answer, and after the damage had been done, I read the comments telling me NOT TO do that.
The current reason I am wanting to install System Python 2.7 is because it is needed to install PyGame. Below is a screenshot of what I am facing when trying to install PyGame:
I recommend installing packages on OS X using Homebrew as it keeps everything you install in one place. Allowing you to upgrade or uninstall easily and not needing to remember how or where you installed it.
Once it is installed you simply type brew install python in your terminal. This will install Python 2.7.10 and it will be available at /usr/local/bin/python.
The only supported way to restore the system Python framework on macOS is to reinstall the operating system. It is treated as a component of the core operating system, so there is no way to selectively reinstall it.
I just installed wrong qt version on my Mac OS. Qt version is 4.8.5. Qt5 is installed into a separate folder, but version 4 is spread over the system, I cannot just delete one folder.
Is there an easy way to uninstall it?
If I remember correctly, there is python script somewhere in /Developer/qt/tools.../uninstall-qt.py
I'm not sure about the names, but you'll recognise the script.
Also, you'll have to run it with sudo, smth like this:
sudo python ./uninstall-qt.py
I hope it helps.
With later versions of macOS and Qt, the solution seems to be to run the MaintenanceTool, as described on the Qt wiki and in another answer.
You should find the tool in ~/Library/Qt.
According to the documentation from python.org, python 3.2 install on mac os requires an upgrade to tcl/tk 8.5.9 (for use of IDLE). In my haste, I have done both. Now my friend told me that python 3 is not recommended yet because only the built-ins and a few modules have been released for 3. The stable one so far is 2.7 (especially if one wants to make extensive use of a variety of modules). My machine has both 2.6.1 and 3.2 (because some OS services make use of 2.6.1 that comes as default with the OS).
1. How do i remove 3.2 completely to avoid any compatibility issues?
tcl/tk 8.5.9 was also installed and this is not the default. There was no verbose mode during installation, so I don't know whether it replaced the default one. If it did how bad can it be for the OS? and hence
2. If the above is really bad, how do i downgrade to the old version of tcl/tk?
In short, how do i bring my machine back to its original state? If anyone knows all the paths to the directories and files I can do it manually.
Thanks
Since Python installs using a package manager, you can use Suspicious Package to look at the install script and where everything is installed.
Be aware this is for demonstration purposes only. My environment is OSX 10.6.8 and am uninstalling python-3.2.2-macosx10.6.dmg.
sudo rm -Rfv /Library/Frameworks/Python.framework/ /Applications/Python\ 3.2/
cd /usr/local/bin/
sudo rm -fv 2to3 2to3-3.2 idle3 idle3.2 pydoc3 pydoc3.2 python3 python3-32 python3-config python3.2 python3.2-32 python3.2-config python3.2m python3.2m-config pythonw3 pythonw3-32 pythonw3.2 pythonw3.2-32 /Developer/Documentation/Python/Reference\ Documentation\ 3.2
I did the same (3.2 on a mac 10.6) and:
-Moved both the Python 3.2 folder and the ActiveState ActiveTcl folder from the Applications Folder to the Trash.
-Moved the Python.framework folder from the Library/Frameworks folder to the Trash.
Running System profiler shows only the 2.6 version of Python.
Marcos
just uninstall 3x version of python if you have already installed it. Eclipse has that option when you click "see whats already installed".
Install later 2.7 version. It works for me on my OS X 10.9.2 with Eclipse Juno.
How do you properly install the open source version of Intel Thread Building Blocks (TBB) on OS X 10.6? The open source version doesn't seem to have a proper install script.
http://www.threadingbuildingblocks.org/ver.php?fid=154
I found an easy way to install it:
brew install tbb
Requires Homebrew, which is highly recommended for any Mac user wanting to use various open source tools.
There is a tutorial for using TBB 2.2 on a Mac without MacPorts/Homebrew. Maybe that's of help for you!
I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site.
I am previous working on Windows and Linux, could anyone let me know what macports is (in easy words) and what is the similar item on Windows/Linux?
thanks in avdance,
George
macports is a way of getting executables and other compiled code installed on your computer without having to work out the details of compiling/linking each apllication.
It is equivalent to a package manager under Linux and other Unicies. There is no direct equivalent under Windows.
It is just a convenient way to install a lot of *nix soft on your mac book. They are installed separately (not overwriting) from binaries/daemons/libs already installed on your mac (by default in folder /opl/local). Also they are much fresher than those installed on your mac.
For example 10.6 ships with bash 3.2, but after running sudo port install bash, you will get version 4.x (to make it your default shell add /opt/local/bin/bash to file /private/etc/shells, run chsh -s /opt/local/bin/bash and reopen terminal).
Note other os x package managers: fink and homebrew (superuser question)