I come from Ubuntu. I know how to install virtualenv and configure stuff on Ubuntu. Now Fedora seems pretty strange to me...

Following these two guides:

Setting up virtualenv, pip, virtualenvwrapper and IPython on Fedora
How to Install Virtualenv in Fedora 16 / 15 / 14

I am getting this when I tried to setup my virtualenv

bash: virtualenv: command not found...

I installed under root. If I do ls:

$ su -
[root@localhost ~]# ls
anaconda-ks.cfg  bin  lib
[root@localhost bin]# ls
virtualenv  virtualenvwrapper.sh
[root@localhost bin]# 
[root@localhost bin]# cd
[root@localhost ~]# cd lib
[root@localhost lib]# ls
[root@localhost lib]# cd python2.7/
[root@localhost python2.7]# ls
[root@localhost python2.7]# cd site-packages/
[root@localhost site-packages]# ls
virtualenv-1.7-py2.7.egg-info  virtualenvwrapper
virtualenv.py                  virtualenvwrapper-2.11-py2.7.egg-info
virtualenv.pyc                 virtualenvwrapper-2.11-py2.7-nspkg.pth
[root@localhost site-packages]#

The bin and lib contains virtualenv. They appear after I installed virtualenv through pip. (I checked this against my fresh Fedora on my laptop, lib and bin do not exist under root directory). During the installation, it was clear to me that virtualenv was installed under the root directory.

How do I fix this? What is the correct way to install virtualenv on Fedora? (I know how to do this on Ubuntu...)

I think su - is bad. plain su will log me in as root but put me in my user's directory instead of the root directory (in the case of su -).

2 Answers 2

yum install python-virtualenv 

  • Weird. I was pretty confident that I installed it. Thanks. I just rescue and did it again. :)
    – CppLearner
    Commented Jan 1, 2012 at 6:00

Now for Fedora 25...

Python 2

sudo dnf install python-virtualenv

Python 3

sudo dnf install python3-virtualenv

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .