sindhugauri
sindhugauri

Reputation: 189

Setting up a virtual environment for python3 using virtualenv on Ubuntu

I want to learn Django so for that, as per the instructions on the website, you need to create a virtual environment. I've heard enough horror stories about people corrupting their OS cause they didn't set up the virtual environments properly so it's safe to say I'm sufficiently paranoid.

I've created a separate folder/directory VirtualE at located at Academics/CS/VirtualENV and I want to create all my virtual environments there. As per the website, the following command should be used -

virtualenv --python=`which python3` ~/.virtualenvs/djangodev

I'm not sure what exactly I should write in place of the single quotes (the which python3 part). I wrote the following -

virtualenv --python=3.5.2 ~/Academics/CS/VirtualENV/DjangoDev

It says

The path 3.5.2 (from --python=3.5.2) does not exist

Where exactly am I going wrong?

Upvotes: 0

Views: 263

Answers (1)

Heapify
Heapify

Reputation: 2891

In the command line, type "which python3" and it will give you the path to python3. You just need to copy and paste that in the command. For example:

virtualenv --python=/path/to/python3/bin/python ~/Academics/CS/VirtualENV/DjangoDev

Upvotes: 3

Related Questions