Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to install a markdown preview plugin for gedit, but when I try to active it, the entry greys out.

Running gedit via the terminal, I get the following error message:

Traceback (most recent call last):
  File "/home/<userid>/.gnome2/gedit/plugins/markdown-preview/__init__.py", line 31, in <module>
    from gpdefs import *
ImportError: No module named gpdefs

** (gedit:2107): WARNING **: Error loading plugin 'Markdown Preview'


Trying to find gpdefs, I only found one potentially related page, which suggest I needed gedit-plugins installed, which I did but this didn't seem to have any effect (other than assorted new plugins).

Any suggestions?

share|improve this question
    
gpdefs.py should be in the PYTHONPATH at that point but manifestly isn't. I don't know whose job it is to make it so. –  Gilles Jun 18 '11 at 21:50
add comment

3 Answers

I think it is a bug. I tried installing it on Ubuntu 10.10 and, even after installing gedit-plugins, I saw exactly the same error message. This ML entry[1] suggests that the install script is not configuring the plugin correctly:

gpdefs (which stands for gedit-plugins definitions) is a file generated by configure, which basically plays the same role as config.h but for python.

If you install gedit-plugins then gpdefs.py is installed to /usr/lib/gedit-2/plugins/ but, as Gilles notes, the markdown plugin does not add it to the python path.

[1] http://comments.gmane.org/gmane.comp.gnome.apps.epiphany/8711

share|improve this answer
add comment

I'm the author of gedit-markdown. Your problem should be fixed in the current version (3.2.1).

Regards.

share|improve this answer
add comment

For anyone else still experiencing this problem, I managed to get the plugin to activate with a custom script to start up gedit that adds the required dir to PYTHONPATH:

#!/bin/bash
export PYTHONPATH=$PYTHONPATH:/usr/lib/gedit-2/plugins
gedit $1 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.