ERROR: virtualenvwrapper could not find virtualenv in your path

后端 未结 12 1912
广开言路
广开言路 2021-02-01 01:06

I\'m trying to create a virtualenv with virtualenvwrapper, but when I use mkvirtualenv I get the following :

ERROR: virtualenvwrapper c         


        
12条回答
  •  有刺的猬
    2021-02-01 01:38

    1. Find where is your virtualenvwrapper located. in my case
     ~/.local/bin
    

    May be it's installed in

    /usr/local/bin/
    

    It totally depends on the System or Package Manager you are using.

    1. Add this path in your shell configuration .bashrc or .zshrc or whatever by simply
    PATH=$PATH:
    

    for example

    PATH=$PATH:~/.local/bin
    

    Also add the following configuration in .bashrc or .zshrc

    # the path you want your virtual environments to be saved and loaded from
    export WORKON_HOME=$HOME/.virtualenvs 
    export PROJECT_HOME=$HOME/
    
    # most important, this is the program which loads virtualenv
    # please update the path where virtualenvwrapper.sh is located
    source /usr/local/bin/virtualenvwrapper.sh 
    

    Don't Forget to restart the shell.. or reload the configuration...

    To test whether it worked

    mkvirtualenv test
    

    if you see a test environment created then everything is ok.

    For Detailed Installation Instructions go to the docs: virtualenvwrapper installation

提交回复
热议问题