0

I am a beginner user in Ubuntu , I have some issue. so please help me.

ghaas0ab@dem0:~$ pip install virtualenv
Requirement already satisfied: virtualenv in /usr/lib/python2.7/dist-packages (15.1.0)

What's mean this message ? and how to install virtualenv?

Thank you,

Aziz
  • 1

2 Answers2

1

The message means you already have installed virtualenv, so there's no need to install it again.

In order to activate it, try to copy + paste following commands:

virtualenv -p python3 .venv

source .venv/bin/activate

for checking your pip packages:

pip freeze

for deactivating:

deactivate

if this does not work for you try this way:

python3 -m venv .venv

but in this case try to ignore the pkg-resources==0.0.0 in your venv otherwise it will give conflict in requirements, ones you transfer your files to someone else.

sebuhi
  • 119
1

It means that virtualenv tool is already installed in your local system. Now to activate virtual environment in your laptop, proceed as follows:

Create the virtualenv:

    $ cd <working_dir> # move into the dir where you want to create venv
    $ virtualenv venv

NOTE: If you have both Python 3 and Python 2 installed, try this command instead of virtualenv venv, it creates an isolated Python 3 environment called venv in your current directory

    $ virtualenv venv -p $(which python3)

Run venv:

    $ source venv/bin/activate

Exit:

    (venv)$ deactivate # to exit the environment