[Libreoffice-bugs] [Bug 143867] Python Implementation Poorly Conceived with No Package Installation Process

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 21 13:25:26 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143867

--- Comment #7 from Ming Hua <ming.v.hua at qq.com> ---
(In reply to flywire from comment #6)
> pip maintainers consider LibreOffice python install is incomplete because
> pip should be installed as part of the distribution -
> https://github.com/pypa/pip/issues/10006#issuecomment-899956947
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.

> 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](https://packaging.python.org/tutorials/installing-packages/#id13)
> > 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')
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.

> C:\Program Files\LibreOffice\program>python get-pip.py
> Defaulting to user installation because normal site-packages is not writeable
Why did this happen?  Did you run the command above with an ordinary user
without administrative privileges?

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

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210821/1e0ff6b9/attachment.htm>


More information about the Libreoffice-bugs mailing list