I was surprised to notice that on a Macbook M1, if I install virtualenvwrapper via brew install virtualenvwrapper that the python module doesn't pick it up. For it to work, I have to explicitly call source .virtualenvwrapper.sh and ain't nobody got time for 'dat!
Looking at the python module here in Prezto, I expected it to automatically discover the presence of the virtualenvwrapper.sh file and source it:
|
virtualenvwrapper_sources=( |
|
${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]} |
|
/usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN) |
|
) |
|
if (( $#virtualenvwrapper_sources )); then |
|
source "$virtualenvwrapper_sources[1]" |
|
fi |
I did notice on a M1 Macbook that since Homebrew uses a different path than intel macs, that may be the problem:
$ which virtualenvwrapper.sh
/opt/homebrew/bin/virtualenvwrapper.sh
But when I tried locally hardcoding the different path, it didn't seem to work:
virtualenvwrapper_sources=(
${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]}
/usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN)
# /opt/homebrew/bin/virtualenvwrapper(_lazy|).sh(OnN)
)
if (( $#virtualenvwrapper_sources )); then
source "$virtualenvwrapper_sources[1]"
fi
I was surprised to notice that on a Macbook M1, if I install
virtualenvwrapperviabrew install virtualenvwrapperthat thepythonmodule doesn't pick it up. For it to work, I have to explicitly callsource .virtualenvwrapper.shand ain't nobody got time for 'dat!Looking at the python module here in Prezto, I expected it to automatically discover the presence of the
virtualenvwrapper.shfile and source it:prezto/modules/python/init.zsh
Lines 138 to 144 in 9195b66
I did notice on a M1 Macbook that since Homebrew uses a different path than intel macs, that may be the problem:
But when I tried locally hardcoding the different path, it didn't seem to work:
virtualenvwrapper_sources=( ${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]} /usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN) # /opt/homebrew/bin/virtualenvwrapper(_lazy|).sh(OnN) ) if (( $#virtualenvwrapper_sources )); then source "$virtualenvwrapper_sources[1]" fi