Python Virtualenv - No module named virtualenvwrapper.hook_loader

前端 未结 16 1518
野趣味
野趣味 2020-12-02 06:01

I\'m running Mac OS 10.6.8. and wanted to install in addition to python 2.6 also python 2.7 and use python 2.7 in a new virtualenv. I executed the following steps:

I

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 06:36

    Even though there is an accepted answer I thought I would put what fixed it for me.

    Firstly I installed Python and had just upgraded it via Homebrew. I am also using ZSH so if some bits don't quite match your output then that might be why.

    By running brew info python and looking through the output I found the following nice bit of information:

    If you wish to have this formula's python executable in your PATH then add
    the following to ~/.zshrc:
        export PATH="/usr/local/opt/python/libexec/bin:$PATH"
    

    So I added this to my terminal startup script as shown and the error n longer displays.

    Note: I inserted this into another part of my PATH and the error persisted on start up.

提交回复
热议问题