virtualenv: command not found, how to install virtualenv on Linux (RHEL/Fedora/Centos)

virtualenv: command not found, how to install virtualenv on Linux (RHEL/Fedora/Centos)

Lets create virtualenv,

$ virtualenv env

Output:

-bash: virtualenv: command not found

virtualenv is not installed on this environment.

Lets see how to install virtualenv on linux (RHEL/Fedora/Centos) pyhton3 environment,

$ sudo yum install python3-virtualenv

Output:

Last metadata expiration check: 2:58:51 ago on Mon 05 Oct 2020 12:00:49 AM EDT.
Dependencies resolved.
=============================================================================================================================================================================
 Package                           	Architecture         	Version                                                 	Repository                              	Size
=============================================================================================================================================================================
Installing:
 python3-virtualenv                	noarch               	15.1.0-19.module+el8.1.0+3514+14e79d98                  	rhosp-rhel-8.2-appstream               	100 k
Installing dependencies:
 python3-wheel-wheel               	noarch               	1:0.31.1-2.module+el8.1.0+3724+3c097090                 	rhosp-rhel-8.2-appstream                	44 k

Transaction Summary
=============================================================================================================================================================================
Install  2 Packages

Total download size: 144 k
Installed size: 341 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): python3-wheel-wheel-0.31.1-2.module+el8.1.0+3724+3c097090.noarch.rpm                                                               	79 kB/s |  44 kB 	00:00    
(2/2): python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch.rpm                                                              	144 kB/s | 100 kB 	00:00    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                    	206 kB/s | 144 kB 	00:00	 
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing    	:                                                                                                                                                 	1/1
  Installing   	: python3-wheel-wheel-1:0.31.1-2.module+el8.1.0+3724+3c097090.noarch                                                                              	1/2
  Installing   	: python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch                                                                                	2/2
  Running scriptlet: python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch                                                                                	2/2
  Verifying    	: python3-wheel-wheel-1:0.31.1-2.module+el8.1.0+3724+3c097090.noarch                                                                              	1/2
  Verifying    	: python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch                                                                                	2/2

Installed:
  python3-virtualenv-15.1.0-19.module+el8.1.0+3514+14e79d98.noarch                 	python3-wheel-wheel-1:0.31.1-2.module+el8.1.0+3724+3c097090.noarch               	 

Complete!

virtualenv is installed on this environment and we are going to test the virtual environment creation using virtualenv command.

$ virtualenv venv

Output:

Using base prefix '/usr'
New python executable in /home/stack/venv/bin/python3.6
Also creating executable in /home/stack/venv/bin/python
Installing setuptools, pip, wheel...done.



Python installation

Privacy Policy  |  Copyrightcopyright symbol2020 - All Rights Reserved.  |  Contact us   |  Report website issues in Github   |  Facebook page   |  Google+ page

Email Facebook Google LinkedIn Twitter
^