Centos7 installation virtualenv bash: virtualenv: command not found ... to solve

Installed under the environmental conditions of python3

1. Installation virtualenv pip3

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv

 

 The figure has been installed successfully

2. When virtualenv: command not found ... the problem

 

3. Add the environment variable to solve

(1) Find find / -name 'virtualenv.py' if there

The figure below shows can be found

 

 (2) adding an environment variable

 

step:

vim / etc / Profile
 # Add the following to the bottom of the file
 the PATH = $ the PATH : / usr / local / python3 / bin

 # is the entry into force command to add the 
Source / etc / Profile

 # finally see if the added successfully
 echo $ the PATH

Screenshot examples:

 

 (3) re-use virtualenv

 

 

# Use virtualenv create a command python3 environment, environment called demo1 
virtualenv - Python = / usr / bin / python3 demo1
 # to enter / demo1 / slow down the virtual directory bin using the command to start the virtual environment 
source activate

 

Guess you like

Origin www.cnblogs.com/hszstudypy/p/11511228.html