Reputation: 48966
I'm trying to install Python3 on a Mac OS X Yosemite, and did that by running the following command:
$ brew install python3
When I tried that, I got the following error:
clang: error: unable to find utility "clang", not a developer tool or in PATH
otool: error: unable to find utility "otool", not a developer tool or in PATH
Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool
How can I fix this issue?
Thanks.
Upvotes: 2
Views: 7162
Reputation: 52797
For me, I ran brew doctor
which said
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
pandoc
heroku
numpy
unbound
[email protected]
So I ran brew link [email protected]
And immediately after, python3
suddenly works!
Upvotes: 0
Reputation: 1
Open Terminal and
[Try]: brew update
[or Homebrew Install]: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
(code source found at https://brew.sh/)
Make sure processes finish, and then [Re-Try]: brew install python3
Upvotes: 0
Reputation: 109706
I would highly recommend using the anaconda distribution, in particular miniconda.
For OSX Yosemite, this is a link to the Python 3.4 64-bit installer.
After downloading the application, open a terminal window, navigate to where you downloaded the app (e.g. cd ~/Downloads) and type:
bash Miniconda-latest-MacOSX-x86_64.sh
Now close and re-open your terminal window for the changes to take effect.
To test your installation, enter the command conda list
from the terminal. If installed correctly, you will see a list of packages that were installed.
From here, you should be able to follow the on-screen instructions. If you get lost, you can refer to their installation guide.
After installing conda, you need to create an environment. To install an new environment named py3
with Python 3:
conda create --name py3 python=3
To activate this environment:
source activate py3
Here, I normally install iPython, iPython notebook and pyqt:
conda install ipython, ipython-notebook, pyqt
Now, to activate an ipython shell from within your environment:
ipython qtconsole
Although this reply does not attempt fix the homebrew issue, it answers the question of how to install Python3 on Mac OS X Yosemite.
Upvotes: 3
Reputation: 1372
Try brew update
and then brew doctor
first. The doctor diagnoses common issues.
Seems something's wrong with your Xcode/Command Line Tools. This answer might be helpful.
Upvotes: 3