Conflicting Python Installs in OSX Mavericks -
i've got myself in pickle , guidance before laptop suffers gbh.
i have been using macbook few years without probs when got new imac @ work noticed recommended useing homebrew new python installs (esp. on mavericks).
now laptop has worked fine original python. decided try , new homebrew way (its mavericks btw).
first clear out mavericks due other conflict reinstall fresh. nginx, php-fpm, mysql, etc working.
now python.
i can use pip install packages. when try
workon myproject
i get:
/usr/bin/python: no module named virtualenvwrapper /usr/bin/python: no module named virtualenvwrapper
but switches virtualenv anyway - not directory project in!
when run where python
several entries:
/usr/local/bin/python /usr/bin/python /usr/local/bin/python
i've tried fiddling path keep getting other errors seem indicate 2 python installations conflicting badly. there simple solution or need wipe out hombrew , start again beginning? or give on homebrew , use osx built in?
to clarify current $path is: /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/x11/bin:/usr/local/go/bin:/users/me/development/android/sdk/tools:/users/me/development/android/sdk/platform-tools
my solution unusual 1 here goes:
in .zshrc
file had following layout:
zsh=$home/.oh-my-zsh zsh_theme="steeef" plugins=(osx virtualenv virtualenvwrapper python github) source $zsh/oh-my-zsh.sh # various aliases export path=/usr/local/bin:/usr/local/sbin:$path
the problem oh zsh plugin virtualenvwrapper looking in default python path location custom path had yet set later in .zshrc
file.
the solution therefore move path declaration before plugins so:
zsh_theme="steeef" export path=/usr/local/bin:/usr/local/sbin:$path plugins=(osx virtualenv virtualenvwrapper python github) source $zsh/oh-my-zsh.sh # various aliases
now zsh plugins referencing correct python install , therefore correct python packages path.
Comments
Post a Comment