<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Python Implementation Poorly Conceived with No Package Installation Process"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143867#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Python Implementation Poorly Conceived with No Package Installation Process"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143867">bug 143867</a>
from <span class="vcard"><a class="email" href="mailto:ming.v.hua@qq.com" title="Ming Hua <ming.v.hua@qq.com>"> <span class="fn">Ming Hua</span></a>
</span></b>
<pre>(In reply to flywire from <a href="show_bug.cgi?id=143867#c6">comment #6</a>)
<span class="quote">> pip maintainers consider LibreOffice python install is incomplete because
> pip should be installed as part of the distribution -
> <a href="https://github.com/pypa/pip/issues/10006#issuecomment-899956947">https://github.com/pypa/pip/issues/10006#issuecomment-899956947</a></span >
Again, I want to point out that the problem description in that ticket seems to
only apply for LO 7.0 or earlier, from my personal experience.
<span class="quote">> Tested on LibreOffice 7.2 (Python 3.8) [LibreOffice 7.0 (Python 3.7) not
> tested].
>
> Following [Ensure you can run pip from the command
> line](<a href="https://packaging.python.org/tutorials/installing-packages/#id13">https://packaging.python.org/tutorials/installing-packages/#id13</a>)
> > If that still doesn’t allow you to run python -m pip
>
> ```
> Microsoft Windows [Version 10.0.19043.1165]
> (c) Microsoft Corporation. All rights reserved.
>
> C:\Program Files\LibreOffice\program>python -m get-pip.py
> C:\Program Files\LibreOffice\program\python-core-3.8.10\bin\python.exe:
> Error while finding module specification for 'get-pip.py'
> (ModuleNotFoundError: __path__ attribute not found on 'get-pip' while trying
> to find 'get-pip.py')</span >
Why did you do this? get-pip.py is the filename of the script, not a python
module name. And -m requires a module parameter to follow. This would never
work, not on LO's bundled python, nor on the official python.org installation.
You should invoke the script directly with "python.exe get-pip.py", like you
did below.
<span class="quote">> C:\Program Files\LibreOffice\program>python get-pip.py
> Defaulting to user installation because normal site-packages is not writeable</span >
Why did this happen? Did you run the command above with an ordinary user
without administrative privileges?
<span class="quote">> Collecting pip
> Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
> Installing collected packages: pip
> Attempting uninstall: pip
> Found existing installation: pip 21.2.4
> Uninstalling pip-21.2.4:
> Successfully uninstalled pip-21.2.4
> WARNING: The scripts pip.exe, pip3.8.exe and pip3.exe are installed in
> 'C:\Users\User\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
> Consider adding this directory to PATH or, if you prefer to suppress this
> warning, use --no-warn-script-location.</span >
And here the script warned you that you are installing pip inside your home
directory, which is normally not checked by LO's python.exe.
<span class="quote">> Successfully installed pip-21.2.4
> ```
>
> I don't know where it found existing installation, it wasn't in the path and
> that folder was empty until pip was installed. Maybe `get-pip.py` needs to
> be downloaded to `C:\Program
> Files\LibreOffice\program\python-core-3.8.10\bin`.</span >
The get-pip.py can be placed in any folder, just make sure to run it with LO's
python. For example
> "C:\Program Files\LibreOffice\program\python.exe" get-pip.py
can be done from any folder that contains get-pip.py.
Also make sure you run it with an admin account (or at least an account that
can write to C:\Program Files\LibreOffice\), and things should go smoothly.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>