ERROR: virtualenvwrapper could not find virtualenv in your path

后端 未结 12 1948
广开言路
广开言路 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条回答
  •  猫巷女王i
    2021-02-01 01:33

    I am using python3 with virtualenvwrapper installed on Ubuntu 18.04, using pip3 without sudo. If you are in this situation, you might find interesting my configuration.

    In the end of my .bashrc I added the following rows (remember to put your username in the YOUR_USERNAME field):

    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
    export WORKON_HOME=$HOME/.virtualenvs
    export VIRTUALENVWRAPPER_VIRTUALENV=/home/YOUR_USERNAME/.local/bin/virtualenv
    source /usr/local/bin/virtualenvwrapper.sh
    

    Then restart the cli with ctrl-D ctrl-T or reload the config with source ~/.bashrc. Then you should be good to go! Try the installation with:

    lsvirtualenv
    mkvirtualenv test
    workon test
    deactivate
    rmvirtualenv test
    

    If you could create and delete a virtual environment, you are ready to go.

提交回复
热议问题