Ich brauche die Homebrew-Version von Python und nicht die Systemversion von Python. Ich habe eine saubere Installation von macOS Sierra (10.12.5).Installation von Homebrew Python und Verknüpfung
Ich habe zuerst Homebrew installiert und dann aktualisiert ~/.bash_profile
mit nano ~/.bash_profile
. Dann habe ich diese in die Datei:
# Homebrew
export PATH=/usr/local/bin:$PATH
Dann musste ich manuell die ~/.bash_profile
Datei beziehen, um sicherzustellen, haben die Änderungen source ~/.bash_profile
neu geladen worden mit.
Ich installierte Python mit brew install python
und versuchte brew linkapps python
Der Ausgang zu verbinden mit, war dies:
Warning: Already linked: /usr/local/Cellar/python/2.7.13_1
To relink: brew unlink python && brew link python
Gautams-Air:~ gautam$ which python
/usr/bin/python
Gautams-Air:~ gautam$ python -V
Python 2.7.10
Gautams-Air:~ gautam$ brew linkapps python
Warning: brew linkapps has been deprecated and will eventually be removed!
Unfortunately brew linkapps cannot behave nicely with e.g. Spotlight using
either aliases or symlinks and Homebrew formulae do not build "proper" .app
bundles that can be relocated. Instead, please consider using brew cask and
migrate formulae using .app's to casks.
Linking: /usr/local/opt/python/IDLE.app
Linking: /usr/local/opt/python/Python Launcher.app
Linked 2 apps to /Applications`
which python
Mit der Ausgang war: /usr/bin/python
Es hätte sein sollen: /usr/local/bin/python
Ich habe es auch versucht Verwendung: brew unlink python && brew link python
Auch python -V
mit es zeigt Python 2.7.10
obwohl die aktuelle Version in Homebrew ist Python 2.7.13
Wie kann ich die Homebrew-Version von Python statt die Systemversion von Python verwenden? - Wie mache ich die Verlinkung?
MIT: macOS Sierra (10.12.5)
[Python mit Homebrew auf OS X verwenden] (http://StackOverflow.com/q/25441252) – jww