-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Description
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:
prezto/modules/python/init.zsh
Lines 138 to 144 in 9195b66
| 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.shBut 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]"
fiMetadata
Metadata
Assignees
Labels
No labels