# Can't Install Django even though all commands are successful

**URL:** <https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380>\
**Category:** Using Django\
**Created:** [August 25, 2021, 12:48am UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380 "2021-08-25T00:48:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 12:48am UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/1 "2021-08-25T00:48:05Z")

</div>

First of all, I am new with Django.  
Per the instructions in “[Quick install guide | Django documentation | Django](https://docs.djangoproject.com/en/3.2/intro/install/)” subsection  
“Install Django” it reads: "In the command prompt, ensure **your virtual environment**  
is active, and execute the following command: …\> py -m pip install Django  
**(Q1)**  **Where is that virtual environment?.**

I have issue the following command without any errors:  
1- pip install Django==3.2.6  
2- py --version  
3- py -m pip install Django  
4- django-admin --version  
5- py -m pip install colorama  
6- py -m pip install Django  
7- python -m django : And generated a massive error, as follows: Note that only  
Django core commands are listed as settings are not properly configured (error:  
Requested setting INSTALLED\_APPS, but settings are not configured. You must  
either define the environment variable DJANGO\_SETTINGS\_MODULE or call  
settings.configure() before accessing settings.). So I really don’t know what’s going  
on since I went to the main search field in W10, typed Django, and the only thing  
that appears is a folder I created 6 days ago. !!  
**Q2 Where is Django?!!**

Additionally, Django does NOT appeared under Control Pannel \> Uninstall  
programs. So, it appears it never installed.  
**Q3 Why all Django related commands work but Django seems NOT to be  
installed (I installed it)?**

**Super important note** : Harvard University CS50 Curriculum requires Django.  
I am stuck progress-wise. Help !  
Ladies And Gentlemen, ant feedback will be welcomed and appreciated  
DH

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2021, 1:44am UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/2 "2021-08-25T01:44:35Z")

</div>

Q1 - That is a Python question more than a Django question. See [venv — Creation of virtual environments — Python 3.12.0 documentation](https://docs.python.org/3/library/venv.html) The specific answer is going to depend a lot about your environment, and choices you need to make.

Q2 - When installed within the virtual environment, it will be within the site-packages directory inside that virtual environment.

Q3 - Django is not a “Windows application”. It’s a library that is part (installed inside) your Python environment.

> [@davidjhernandez1](#):
>
> **Super important note** : Harvard University CS50 Curriculum requires Django.

They should then be providing guidance on how they suggest or want it installed.

Finally, regardless of any other items, I **strongly** suggest you start with the [installation guide](https://docs.djangoproject.com/en/3.2/topics/install/) and then work your way through the [official Django tutorial](https://docs.djangoproject.com/en/3.2/intro/tutorial01/).

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 1:30pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/3 "2021-08-25T13:30:52Z")

</div>

Hi Ken, thank you very much for your reply.

**Regarding your reply #1:** I am totally new, I don’t know what kind of environment I need and choices to make. I only know I need to study Django and and do project1 (2nd Project). Do the “Virtual environment” allows you to choose a “student environment” or a “basic environment” or a “local environment”?.

**Regarding your reply #2:** You wrote “When installed within the virtual environment”, Is there a possibility to install Django locally in my computer? That will be great !!!

**Regarding your reply #3:** Ok. I hope and I need to have it installed. My Python installation is local.

**Reg the Harvard Curriculum** : It is easier to get an answer from the Miami DMV or an answer from the IRS or an appointment with immigration than getting someone to talk to or to answer to from the Harvard curriculum team. Funny but true. 😀 😀

Again, my apologies from being so new with Django (Which I find amazing what it can do, based on the articles I read), and hope you’ll find some few minutes for a feedback.

Thank you.  
DH

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2021, 2:22pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/4 "2021-08-25T14:22:46Z")

</div>

All virtual environments (venv) are local. It’s Python’s way of setting up an environment that is isolated from other environments on your system. For example, you might have a venv for Django version 3.2, and another for Django 3.1. Or, since this is fundamentally a Python issue (not just Django), you may have a venv without Django at all. Again, the docs at [venv — Creation of virtual environments — Python 3.9.6 documentation](https://docs.python.org/3/library/venv.html) (and the link to [PEP 405 -- Python Virtual Environments | Python.org](https://www.python.org/dev/peps/pep-0405/) and [Installing packages using pip and virtual environments — Python Packaging User Guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment)) provide a lot of information.

So if I were to break this down into steps:

1. Install Python ([Python Releases for Windows | Python.org](https://www.python.org/downloads/windows/))
2. Create a virtual environment (and then activate it)
3. Install Django ([How to install Django | Django documentation | Django](https://docs.djangoproject.com/en/3.2/topics/install/))
4. Work through the Django tutorial ([Writing your first Django app, part 1 | Django documentation | Django](https://docs.djangoproject.com/en/3.2/intro/tutorial01/))

I’ll also recommend that if you’re going to follow _those_ steps, you should _avoid_ all other tutorials. There are many ways of setting things up, and frequently, different tutorials will present different methods. Trying to mix steps from different sources tends to create confusion and cause problems.  
So regardless of what source of information you choose, pick **one** and work through it.

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 2:43pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/5 "2021-08-25T14:43:31Z")

</div>

Ok.  
Step-1: Done. I have Python installed. ✅  
Step-2: Created a virtual environment and activated: ❌  
I was able to issue the first 3 commands (From the [link u provided](https://docs.python.org/3/library/venv.html) and  
from the command prompt as an admin), but unknown how to issue the  
4rth command. I tried: **C:\Users\tempo\Django\>venv env\_dir** and  
got the following error:  
**Error** : ‘venv’ is not recognized as an internal or external command,  
operable program or batch file.

If you have an idea how to build the venv command to create a virtual  
Python environment in the target directory C:\Users\tempo\Django\> , I  
will highly appreciate the “how to” issue that command. Thanks. DH

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2021, 2:46pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/6 "2021-08-25T14:46:33Z")

</div>

Virtual environments are not created as admin. They’re intended to be by-user, not (necessarily) system wide.

What specifically is the 4th command you’re referring to?

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 3:05pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/7 "2021-08-25T15:05:50Z")

</div>

When I wrote “as admin”, I meant that when I invoke the command prompt in W10, it gives you the option to run the command prompt as “an administrator”, and that is what I chosed. The 4th command is the one found right below the sentence **"** The command, if run with `-h` , will show the available options: **"** within the URL [provided](https://docs.python.org/3/library/venv.html).

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 3:09pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/8 "2021-08-25T15:09:17Z")

</div>

The grean area below the sentence **“The command, if run with `-h` , will show the available options:”** shows how to build and issue the command to (verbatim) **"Creates virtual Python environments in one or more target directories."**

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 3:11pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/9 "2021-08-25T15:11:17Z")

</div>

I even tried this:  
C:\Users\tempo\Django\>venv C:\Users\tempo\Django  
‘venv’ is not recognized as an internal or external command,  
operable program or batch file.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2021, 4:22pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/10 "2021-08-25T16:22:03Z")

</div>

Again, please copy into your reply the _exact_ command the doc is telling you to run.

And yes, I know exactly what you’re referring to regarding admin. That’s _not_ what you want / need to do here. There is no reason to create a virtual environment within an admin context.

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 8:32pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/11 "2021-08-25T20:32:44Z")

</div>

Ken,

I don’t know how I did it, but the **links you provided were instrumental**!!  
I installed Django !!!. Thank you.

I feel closer to have the environment ready.

I don’t know how I did it, but I seem to have all the files he has in the video

 ![Django Matching files](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/f/f4de790c4e912a099a97b12390d02efa5f6b08d5.png)

I do apologized for not placing the command I was questioning. I read your reply.

I only have one question which the colleagues I am working with don’t know either.  
How do we get the same application or the same editor or the same something the tutor uses to issue commands\*\*?\*\*

Please look at this pict, within it you will see has something called django-admin

Sorry, I cannot add another media because I am new in the forum. I’ll put it in the next msg.

From where a “django-admin” comes from\*\*?\*\*

Can an issue all my commands from the command prompt and from Visual Studio Code (There is a big file called django.py that popped up in mi Visual studio code) **?**

Thanks.  
DH

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2021, 8:37pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/12 "2021-08-25T20:37:26Z")

</div>

- Install Django ([How to install Django | Django documentation | Django](https://docs.djangoproject.com/en/3.2/topics/install/))
- Work through the Django tutorial ([Writing your first Django app, part 1 | Django documentation | Django](https://docs.djangoproject.com/en/3.2/intro/tutorial01/))

---

<div class="post-metadata">

**Author:** ![davidjhernandez1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/davidjhernandez1/32/5594_2.png) [@davidjhernandez1](https://forum.djangoproject.com/u/davidjhernandez1)\
**Post date:** [August 25, 2021, 8:38pm UTC](https://forum.djangoproject.com/t/cant-install-django-even-though-all-commands-are-successful/9380/13 "2021-08-25T20:38:04Z")

</div>

![django-admin](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/c/ce080b3ff914a94437967171fe29c6e66b9f802a.png)
