Open evacchi opened 6 years ago
Hi,
How did you install code highlighter? Did you use .oxt
file or .zip
file from GitHub releases?
Hi, I downloaded from libreoffice extension website, I've also tried to download oxt from github, to the same effect. It looks like Python support should be installed, I could run the Hello World macro... what else can I check?
It also has dependencies with libreoffice-script-provider-python
. Most of the times it comes with LO.
Please make sure that you have this package.
unfortunately there is no such package on fedora. I did install libreoffice-pyuno
which should be the same, though
In Fedora the python script provider for libreoffice is libobasis6.0-python-script-provider, not that one you put as a dependency. Please, add this one to dependencies, because all RedHat-derivated distros use this one.
SOLVED: just copy Pygments directory that you have in Python installation on your system, once you've installed it by pip, from the address "/usr/lib/pythonx.x.x/site-packages/" to "/path/to/libreoffice/program/python-core-x.y.z/lib/site-packages". NB1: create the directory "site-packages" if there isn't in your libreoffice "../python-core-x.y.z/lib" directory; NB2: Python version in LO hasn't to necessarily be the same than systemwide installed Python), so don't worry about it: just take Pygments from wherever you want. NB3: you have to open a file manager in root mode. If you have KDE use Konqueror, because Dolphin can't be started in root mode due to some asspaining security feature ??? Profit
hi @ruben1981 where is "/path/to/libreoffice/program/python-core-x.y.z/lib/site-packages"?
I don't find it in openSUSE where it should be in around /usr/lib64/libreoffice/program/
there's no python-core folder
@ruben1981 's solution worked for me!
I installed via Windows 10 with build 18362. I had an issue that was basically the same thing but it was referring to different lines on the python script mentioned. I can't replicate the exact issue now since I got it to work.
Anyway, another thing to mention like what @ruben1981 said, I'm assuming you also need the .oxt file in the same directory as the dependencies within the ...python-core-x.y.z\lib\site-packages\ folder.
So it should be under the path ...\LibreOffice\program\python-core-x.y.z\lib\site-packages\
And within that directory, it should be your pygments dependencies you downloaded, and codehighlighter.oxt.
Once I did that, my error went away and I was golden from there.
"/path/to/libreoffice/program/python-core-x.y.z/lib/site-packages"
@ruben1981 Which path is this? I couldn't find anything like that in my /usr
. I'm using standard LibreOffice installation from ArchLinux, but I believe paths should be the same as in some Ubuntu.
I have also this problem in Ubuntu 20.10: I wonder, why? I followed all steps and install all the required packages using commands:
sudo apt install libreoffice-writer
sudo apt install libreoffice-script-provider-python python3-pip
sudo pip3 install pygments
pip3 install pygments
It used to work fine. Don't know what happened. LO: 7.0.3.1
Edit: Judging by the above discussion, I have this to say: I have two folders:
None of them include, python-core-x.y.z\lib\site-packages subfolder. Should I create one? Then where? In lib or share.
I have also this problem in Ubuntu 20.10: I wonder, why? I followed all steps and install all the required packages using commands:
sudo apt install libreoffice-writer sudo apt install libreoffice-script-provider-python python3-pip sudo pip3 install pygments pip3 install pygments
It used to work fine. Don't know what happened. LO: 7.0.3.1
help
Edit: Judging by the above discussion, I have this to say: I have two folders:
- /usr/share/libreoffice/program
- /usr/lib/libreoffice/program
None of them include, python-core-x.y.z\lib\site-packages subfolder. Should I create one? Then where? In lib or share.
Same here on Mint 20.1, but I could notice that when downloading this extension from libre office's website, the name was weird
ea4db15f_codehighlighter.oxt
I just renamed to codehighlighter.oxt
, removed and re-installed and now everything is fine. I hope this helps.
Also had to use same commands:
sudo apt install libreoffice-writer
sudo apt install libreoffice-script-provider-python python3-pip
sudo pip3 install pygments
pip3 install pygments
When I select the menu item:
pygments is installed