# Pip is not installed by windows installer

**URL:** <https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440>\
**Category:** Python Help\
**Created:** [March 14, 2024, 1:50am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440 "2024-03-14T01:50:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluexp1](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bluexp1/32/18526_2.png) [@bluexp1](https://discuss.python.org/u/bluexp1)\
**Post date:** [March 14, 2024, 1:50am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/1 "2024-03-14T01:50:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kknechtel](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kknechtel](https://discuss.python.org/u/kknechtel)\
**Post date:** [March 14, 2024, 3:36am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/2 "2024-03-14T03:36:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bluexp1](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bluexp1/32/18526_2.png) [@bluexp1](https://discuss.python.org/u/bluexp1)\
**Post date:** [March 14, 2024, 5:34am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/3 "2024-03-14T05:34:12Z")

</div>

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:

```python
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.

```

---

<div class="post-metadata">

**Author:** ![barry-scott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@barry-scott](https://discuss.python.org/u/barry-scott)\
**Post date:** [March 14, 2024, 7:05am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/4 "2024-03-14T07:05:44Z")

</div>

Use can use `python -m pip` and you should see it is already installed.  
I am assuming you are using the [python.org](http://python.org) install.

---

<div class="post-metadata">

**Author:** ![bluexp1](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bluexp1/32/18526_2.png) [@bluexp1](https://discuss.python.org/u/bluexp1)\
**Post date:** [March 14, 2024, 8:28am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/5 "2024-03-14T08:28:36Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![barry-scott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@barry-scott](https://discuss.python.org/u/barry-scott)\
**Post date:** [March 14, 2024, 9:31am UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/6 "2024-03-14T09:31:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bluexp1](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bluexp1/32/18526_2.png) [@bluexp1](https://discuss.python.org/u/bluexp1)\
**Post date:** [March 14, 2024, 12:10pm UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/7 "2024-03-14T12:10:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bluexp1](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bluexp1/32/18526_2.png) [@bluexp1](https://discuss.python.org/u/bluexp1)\
**Post date:** [March 18, 2024, 7:29pm UTC](https://discuss.python.org/t/pip-is-not-installed-by-windows-installer/48440/8 "2024-03-18T19:29:32Z")

</div>

Problem solved by reinstalling windows from another source!
