不可能进口python-uno
我的目标是编写一个使用libreoffice打开数千个XLS文件并将其保存为CSV文件的Python脚本(文件已损坏,因此我需要使用Libreoffice打开它们,然后使用Libreoffice将其保存为CSV)。
看来Python Uno是这样做的方式,但我无法使其起作用。 我正在使用Linux Mint 20.3(UNA),而Python 3.7.4
这是我所做的:
命令提示:
sudo apt apt update
sudo apt -y apt -y install install python3 -uno
python3-uno is already the newest version (1:6.4.7-0ubuntu0.20.04.4).
然后我打开python,然后尝试导入uno:
python3
导入uno
>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'uno'
我尝试了我在Internet上发现的每个“解决方案”,但它们都没有起作用。 其中包括:
确保我正在使用Python3: ImportError: no module named uno bug
Trying to install uno with "sudo apt-get install libreoffice-script-provider-python":
我尝试过的时间太长了,无法在这里适合。
My goal is to write a python script that uses LibreOffice to open thousands of xls files and save them as csv files (the files are corrupted, so I need to open them using LibreOffice and then use LibreOffice to save them as csv).
It seems that python uno is the way to do it, but I cannot make it work.
I am using Linux Mint 20.3 (Una), and Python 3.7.4
This is what I did:
Command prompt:
sudo apt update
sudo apt -y install python3-uno
python3-uno is already the newest version (1:6.4.7-0ubuntu0.20.04.4).
Then I open python and try to import uno:
python3
import uno
>>> import uno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'uno'
I have tried every single "solution" I found on the internet, none of which worked.
They included:
Uninstalling Uno and installing again: https://www.youtube.com/watch?v=3XD9Of_05lk
Making sure that I am using python3: Import uno ImportError: no module named uno bug
Trying to install uno with "sudo apt-get install libreoffice-script-provider-python": https://askubuntu.com/questions/418225/how-do-i-install-the-python-uno-package
The list of things that I tried is too long to fit here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论