Django Virtual Environment

21 views
Skip to first unread message

yingi keme

unread,
Jun 12, 2017, 1:10:10 PM6/12/17
to Django users
Hello

I have this issue i am trying to resolve. I installed django directly into my Python35 directory without creating a new virtual environment for my project.

However, now i want to create a new virtual environment for a new project. If i make some modifications in django inside this new virtual environment, will it not affect my previous project.? Do i need to install a new django entirely?

Russell Keith-Magee

unread,
Jun 12, 2017, 1:24:36 PM6/12/17
to Django users
Hi Yingi,

Once you create a virtual environment, it is an isolated sandbox. It doesn’t have access to the world outside that sandbox. That includes Django - your virtual environment will need to have Django installed separately, even if your “main” Python 3.5 install already has Django installed.

Yours,
Russ Magee %-)
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/857441fd-c46f-48b1-818e-13380d4c0072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yingi keme

unread,
Jun 12, 2017, 1:42:42 PM6/12/17
to django...@googlegroups.com
Okk.

But then when i create a new virtual environment, and i try to install a seperate django. It says the django package already exist. Is it that i have to install another version of django?

Yingi Kem

Antonis Christofides

unread,
Jun 12, 2017, 1:50:20 PM6/12/17
to django...@googlegroups.com

If you have created the virtualenv with --system-site-packages, you need to tell it "pip install --upgrade django".

See also https://djangodeployment.com/2016/11/01/virtualenv-demystified/.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

Oladipupo Elegbede

unread,
Jun 12, 2017, 2:57:42 PM6/12/17
to django...@googlegroups.com
Be sure, just double check you're inside the virtual environment.

You should see something like

(your_env)c/path/to/your/project:

On Jun 12, 2017 8:50 AM, "Antonis Christofides" <ant...@djangodeployment.com> wrote:

If you have created the virtualenv with --system-site-packages, you need to tell it "pip install --upgrade django".

See also https://djangodeployment.com/2016/11/01/virtualenv-demystified/.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com
On 2017-06-12 16:41, yingi keme wrote:
Okk.

But then when i create a new virtual environment, and i try to install a seperate django. It says the django package already exist. Is it that i have to install another version of django?

Yingi Kem

On 12 Jun 2017, at 2:22 PM, Russell Keith-Magee <rus...@keith-magee.com> wrote:

Hi Yingi,

Once you create a virtual environment, it is an isolated sandbox. It doesn’t have access to the world outside that sandbox. That includes Django - your virtual environment will need to have Django installed separately, even if your “main” Python 3.5 install already has Django installed.

Yours,
Russ Magee %-)

On 12 Jun 2017, 9:10 PM +0800, yingi keme <ying...@gmail.com>, wrote:
Hello

I have this issue i am trying to resolve. I installed django directly into my Python35 directory without creating a new virtual environment for my project.

However, now i want to create a new virtual environment for a new project. If i make some modifications in django inside this new virtual environment, will it not affect my previous project.? Do i need to install a new django entirely?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/330dd057-0b22-4cad-83ba-25837e8f52a7%40Spark.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages