osx - Can't set Homebrew python to bet the default python? -


i wiped mac , reinstalled macos.

i installed homebrew , installed python brew install python. if use which python /usr/bin/python. when typing echo $path returns usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.

my .bash_profile file:

# load shell dotfiles, , some: # * ~/.path can used extend `$path`. # * ~/.extra can used other settings don’t want commit. file in ~/.{path,bash_prompt,exports,aliases,functions,extra};   [ -r "$file" ] && source "$file" done unset file  # brew cask install location export homebrew_cask_opts="appdir=~/applications" 

my .path file:

path="/usr/local/bin:$path" export path 

what need set homebrew python default?

//edit installed ruby homebrew , works python doesn't...

//edit2 some adjustments

you need modify $path, check output of homebrew when installing python brew install python:

==> caveats formula installs python2 executable /usr/local/bin. if wish have formula's python executable in path add following ~/.zshrc:   export path="/usr/local/opt/python/libexec/bin:$path"  pip , setuptools have been installed. update them   pip2 install --upgrade pip setuptools  can install python packages   pip2 install <package>  install site-package directory   /usr/local/lib/python2.7/site-packages  see: http://docs.brew.sh/homebrew-and-python.html 

something should work:

export path="/usr/local/opt/python/libexec/bin:$home/library/python/2.7/bin:$home/library/python/3.6/bin:..." 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -