Pip is not installed by windows installer

Trying to install python 3.11 on Win11, it didn’t install pip and ‘script’ directory is empty ( I’ve checked “install pip” during installation).
Also running python -m ensurepip --user gives this error:
“ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied”
Is there some problem with windows?

Did you install for all users or for this user only?

In the latter case, are you trying to use ensurepip for the same user?

Where exactly did the Python installation end up?

Do you get any more output than that? Please copy and paste a complete error message, and format it like multi-line code.

No, It was installed for current user, and yes, I use that command for the same user.
Python installation ended up successfully.
This is complete output:

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied
Check the permissions.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "E:\Portables\python311\Lib\ensurepip\__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ^^^^^^^^^^^^^^^^^
  File "E:\Portables\python311\Lib\ensurepip\__init__.py", line 286, in _main
    return _bootstrap(
           ^^^^^^^^^^^
  File "E:\Portables\python311\Lib\ensurepip\__init__.py", line 202, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Portables\python311\Lib\ensurepip\__init__.py", line 103, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Portables\python311\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['E:\\Portables\\python311\\python.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'C:\\\\Users\\\\bluexp\\\\AppData\\\\Local\\\\Temp\\\\tmpixn9doze\\\\setuptools-65.5.0-py3-none-any.whl\', \'C:\\\\Users\\\\bluexp\\\\AppData\\\\Local\\\\Temp\\\\tmpixn9doze\\\\pip-24.0-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'C:\\\\Users\\\\bluexp\\\\AppData\\\\Local\\\\Temp\\\\tmpixn9doze\', \'--user\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.

Use can use python -m pip and you should see it is already installed.
I am assuming you are using the python.org install.

Here is the output of that comamnd:
“python.exe: No module named pip”

Yes, I am using python.org setup file, Is there any other reliable alternative?
My guess is that windows defender blocks some process during installation without notice.

What version of python have you installed?
Where did you download the python setup .exe from?
Windows defender does not block any of the install files.

I downloaded this setup file:
https://www.python.org/ftp/python/3.11.8/python-3.11.8-amd64.exe

Problem solved by reinstalling windows from another source!