Installed virtualenv and virtualenvwrapper: Python says no module named virtualenvwrapper

前端 未结 10 2108
挽巷
挽巷 2021-01-30 01:49

Lots of other threads about similar issues, but none that I could find where quite the same case as mine. So, here goes:

Things I did:

  • Ran
10条回答
  •  滥情空心
    2021-01-30 02:02

    Got this error after recently (summer 2017) updating Homebrew and python. The issue in my case was that Homebrew no longer overwrites the system python and I didn't have virtualenv and virtualenvwrapper installed for the system python.

    The solution in my case was to add the following to ~/.bash_profile (or ~/.zshrc):

    export PATH="$(brew --prefix)/opt/python/libexec/bin:$PATH"

    This made python point to the brew version of python and also gave me pip back. This version of python had virtualenv and virtualenvwrapper installed so the error no longer appeared. See the caveats section under brew info python and https://github.com/Homebrew/homebrew-core/issues/15746 for more information

提交回复
热议问题