Installed virtualenv and virtualenvwrapper: Python says no module named virtualenvwrapper

前端 未结 10 2110
挽巷
挽巷 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:10

    I've managed to get this working after having the same problem you've described here by editing my ~/.bash_profile and adding this:

    export WORKON_HOME=$HOME/code/.virtualenvs
    export PROJECT_HOME=$HOME/code
    export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
    export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
    export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
    
    source /usr/local/bin/virtualenvwrapper.sh
    

    Save, close.

    then:

    $ source ~/.bash_profile
    

    and:

    $ mkvirtualenv test
    

提交回复
热议问题