简体   繁体   中英

bash: mkvirtualenv: command not found

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

open your bashrc file using

gedit ~/.bashrc

go to the bottom of the bashrc file and copy these lines and paste it

which python3(gives you the python path)

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3


export WORKON_HOME=$HOME/.virtualenvs

which virtualenv (gives you the location of virtualenv)

export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv

which virtualenvwrapper.sh(returns the location of virtualenvwrapper.sh)

source /usr/local/bin/virtualenvwrapper.sh

please copy these lines in the same order as given above

for more information you can refer to: https://www.freecodecamp.org/news/virtualenv-with-virtualenvwrapper-on-ubuntu-18-04/

Alternatively you can use:

create virtual environment :

python3 -m venv <virtual environment name>

virtualenv <virtual environment name>

To activate the virtual environment

source <virtual environment name>/bin/activate

To deactivate the virtual environment

deactivate

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

After following the instructions on Doug Hellman's virtualenvwrapper post , I still could not fire up a test environment.

[mpenning@tsunami ~]$ mkvirtualenv test
-bash: mkvirtualenv: command not found
[mpenning@tsunami ~]$

It should be noted that I'm using WORKON_HOME that is not in my $HOME . I tried looking for /usr/local/bin/virtualenvwrapper.sh as shown in thevirtualenvwrapper installation docs , but it does not exist.

I'm running CentOS 6 and python 2.6.6, if this matters.


# File: ~/.bash_profile
# ...

export WORKON_HOME="/opt/virtual_env/"
source "/opt/virtual_env/bin/virtualenvwrapper_bashrc"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM