Related questions:
How update Libre Office Python on windows?
Pyuno on Python 3.6 installation issue
I have downloaded get-pip.py to my LibreOffice program folder, and used it to install pip. Using pip in that folder, I have installed pymodbus. pip list shows that pymodbus is installed for that version of python, in that folder. And pymodbus is there, in the site-packages folder.
But when I try to run a script ("from pymodbus.client.sync import ModbusTcpClient ") in APSO, I get this error:
<class 'ImportError'>: No module named 'pymodbus.client.sync' (or 'pymodbus.client.sync.ModbusTcpClient' is unknown)
File "C:\Program Files (x86)\misc\LibreOffice\program\pythonscript.py", line 1057, in getScript
mod = self.provCtx.getModuleByUrl( fileUri )
File "C:\Program Files (x86)\misc\LibreOffice\program\pythonscript.py", line 494, in getModuleByUrl
exec(code, entry.module.__dict__)
File "C:\Program Files (x86)\misc\LibreOffice\share\Scripts\python\MyTestScript.py", line 8, in <module>
from pymodbus.client.sync import ModbusTcpClient
File "C:\Program Files (x86)\misc\LibreOffice\program\uno.py", line 425, in _uno_import
raise uno_import_exc
File "C:\Program Files (x86)\misc\LibreOffice\program\uno.py", line 346, in _uno_import
return _builtin_import(name, *optargs, **kwargs)
pip list tells me that the only known site packages are distlib, filelock, pip, platformirs, pymodbus, setuptools, virtualenv, wheel.
This is Win7/64, LibreOffice 7.4 (python-core-3.8.14).
Not particularly related questions: pip installed module but python gives Import error Too many different Python versions on my system and causing problems
https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python is installed and can be used: https://superuser.com/questions/1297120/use-a-python-function-as-formula-in-libreoffice-calc-cells
There is no other python installed (but there has been). I don't know why a package which is in sitelibs should show that error: I don't know if I've done anything wrong or different. Does it make any sense to anyone else?
I've used that same package and same statement in other installations of python 3.8: This is the first time I've done anything with LibreOffice.