Installing on windows

I’m trying to install Django using the CMD

Everythi n l o oks good as pip seemed to work, How do I test if it worked?
I tried jango-admin but

See the second warning in your output. You may want to add that path to your PATH.

Or, what I would actually suggest is that you create a virtual environment in which to do all this work.

See the more detailed instructions at How to install Django on Windows | Django documentation | Django

ok I tried to install python, but I opened the Command Prompt to verify but

What specific steps did you follow to install Python?
(What web page or resource did you use for instructions?)

I clickedthe link you sent, downloaded the exe ran it


But when I try to verify it was installed,

thats where I get the error?

You want to install with the checkbox to “Add Python to PATH” set.

1 Like

when I try to reinstall, it fails annnnd the log says…

[4798:53D4][2023-03-01T13:47:41]i001: Burn v3.14.0.5722, Windows v10.0 (Build 19044: Service Pack 0), path: C:\Users\LURTNO~1\AppData\Local\Temp{D18D2FD7-064F-446A-8AE6-99314DBB93DF}.cr\python-3.11.2-amd64 (2).exe

I can see it using Anaconda, not the CMD

I’m not sure what you mean by “it fails”.

That output you posted is fundamentally correct for what you would expect to see at that point.

If you’re still having problems, I would suggest:

  • Removing all python installations. All Condas. Everything that even might create a potential conflict.

  • Reboot.

  • Verify that all instances of Python, along with all DLLs and affiliated libraries have been removed from the system.

  • Install one instance of the correct runtime as admin, ensuring that the install is set up for all users and that it is added to the path.

  • Reboot again.

  • Try to use it.

  • If successful, create your virtual environment and install Django in it.

(myworld) PS D:\Django\myworld> py -m pip install Django
Collecting Django
Using cached Django-5.0.3-py3-none-any.whl.metadata (4.2 kB)
Collecting asgiref<4,>=3.7.0 (from Django)
Using cached asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)
Collecting sqlparse>=0.3.1 (from Django)
Using cached sqlparse-0.4.4-py3-none-any.whl.metadata (4.0 kB)
Collecting tzdata (from Django)
Using cached tzdata-2024.1-py2.py3-none-any.whl.metadata (1.4 kB)
Downloading Django-5.0.3-py3-none-any.whl (8.2 MB)
━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.3/8.2 MB 737.3 kB/s eta 0:00:11
ERROR: Exception:
Traceback (most recent call last):
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 438, in _error_catcher
yield
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 561, in read
data = self._fp_read(amt) if not fp_closed else b""
^^^^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 527, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
^^^^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 98, in read
data: bytes = self.__fp.read(amt)
^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\http\client.py”, line 479, in read
s = self.fp.read(amt)
^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\socket.py”, line 707, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\ssl.py”, line 1252, in recv_into
return self.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\ssl.py”, line 1104, in read
return self._sslobj.read(len, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2559)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\Django\myworld\Lib\site-packages\pip_internal\cli\base_command.py”, line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_internal\cli\req_command.py”, line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_internal\commands\install.py”, line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py”, line 179, in resolve
self.factory.preparer.prepare_linked_requirements_more(reqs)
File “D:\Django\myworld\Lib\site-packages\pip_internal\operations\prepare.py”, line 552, in prepare_linked_requirements_more
self._complete_partial_requirements(
File “D:\Django\myworld\Lib\site-packages\pip_internal\operations\prepare.py”, line 467, in _complete_partial_requirements
for link, (filepath, _) in batch_download:
File “D:\Django\myworld\Lib\site-packages\pip_internal\network\download.py”, line 183, in call
for chunk in chunks:
File “D:\Django\myworld\Lib\site-packages\pip_internal\cli\progress_bars.py”, line 53, in _rich_progress_bar
for chunk in iterable:
File “D:\Django\myworld\Lib\site-packages\pip_internal\network\utils.py”, line 63, in response_chunks
for chunk in response.raw.stream(
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 622, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 560, in read
with self._error_catcher():
File “C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\contextlib.py”, line 158, in exit
self.gen.throw(value)
File “D:\Django\myworld\Lib\site-packages\pip_vendor\urllib3\response.py”, line 449, in _error_catcher
raise SSLError(e)
pip._vendor.urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2559)