Sublime Forum

Problem importing markdown with mdpopups

#1

Today i am suddenly getting this error when importing a local package. Anyone know how to fix?

Not sure if this arose after installing some separate tools or updating ubuntu, no idea.

import mdpopups

File “/home/<>/.config/sublime-text/Lib/python33/mdpopups/init.py”, line 13, in
from . import markdown
ImportError: cannot import name markdown

thnx.

0 Likes

LSP with Sublime Text 3.2.2
#2

mdpopups 4.3+ requires typing library on python 3.3. Plugins using mdpopups must therefore add it to their dependencies.json to resolve this issue.

Assuming a plugin opts-in to python 3.8 on ST4 a proper dependency could look like

{
    "*": {
        "<4000": [
            "mdpopups",
            "typing"
        ],
        ">=4000": [
            "mdpopups"
        ]
    }
}
1 Like

#3

That was it! Thanks.

I fixed by installing manually, as Sublime was not automatically installing it even when in the dependencies (though i did not try reinstalling the parent package).

Fixed with:
cd ~/.config/sublime-text/Lib/python33/
pip3 install typing --target=.

thnx

0 Likes

#4

Libraries are installed at ST startup or by calling “Package Control: Satisfy Libraries” from command palette.

0 Likes

#5

FYI, now i am seeing the same issue on mac os. I have not touched any Python or any Sublime packages lately. So, the error must be due to a Sublime Text update. I am on build 4200.

0 Likes

#6

It just means you are having plugins, which don’t opt-in to python 3.8 and rely on mdpopups. This sort of issue is unrelated with Sublime Text version in use.

0 Likes