# Error activating Python plugin

**URL:** <https://discourse.mapeditor.org/t/error-activating-python-plugin/2346>\
**Category:** Questions\
**Created:** [May 7, 2017, 8:54am UTC](https://discourse.mapeditor.org/t/error-activating-python-plugin/2346 "2017-05-07T08:54:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shrike78](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/shrike78/32/1201_2.png) [@Shrike78](https://discourse.mapeditor.org/u/Shrike78)\
**Post date:** [May 7, 2017, 8:54am UTC](https://discourse.mapeditor.org/t/error-activating-python-plugin/2346/1 "2017-05-07T08:54:52Z")

</div>

Hi. I’d like to write a custom exporter using python but if I try to activate to python plugin i got an error. Under Preferences/Plugins the python.dll is marked with a red icon and the tooltip says ‘Cannot Load library [path]\python.dll, impossible to find the module’.

I’m using tiled 0.18.2 and windows 10

I’ve no python 2-7 installed (but I’ve also tried to install python 2.7.13 and nothing chanded)

Any suggestion?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [May 7, 2017, 9:09am UTC](https://discourse.mapeditor.org/t/error-activating-python-plugin/2346/2 "2017-05-07T09:09:10Z")

</div>

> [@Shrike78](#):
>
> I’ve no python 2-7 installed (but I’ve also tried to install python 2.7.13 and nothing chanded)

Hmm, instaling Python 2.7.13 is supposed to do the trick. I’ll have to check this.

Maybe it needs a restart after installing Python 2.7.13, to make sure the DLL is in the path?

---

<div class="post-metadata">

**Author:** ![Shrike78](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/shrike78/32/1201_2.png) [@Shrike78](https://discourse.mapeditor.org/u/Shrike78)\
**Post date:** [May 7, 2017, 12:03pm UTC](https://discourse.mapeditor.org/t/error-activating-python-plugin/2346/3 "2017-05-07T12:03:03Z")

</div>

Hi @bjorn I’m sorry, it was my fault: I forgot to add python27 to system path before because the option it’s not marked in default python installation. Now it works fine.

A question: does it exist some documentation about how to write custom importer/exporter python based?

Thanks

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [May 7, 2017, 12:07pm UTC](https://discourse.mapeditor.org/t/error-activating-python-plugin/2346/4 "2017-05-07T12:07:33Z")

</div>

> [@Shrike78](#):
>
> Hi @bjorn I’m sorry, it was my fault: I forgot to add python27 to system path before because the option it’s not marked in default python installation. Now it works fine.

Ok, that’s great to hear!

> [@Shrike78](#):
>
> A question: does it exist some documentation about how to write custom importer/exporter python based?

Unfortunately not yet, there only exist [some example scripts](https://github.com/bjorn/tiled/tree/master/src/plugins/python/scripts) in the repository. I’m in an effort to write a Tiled Manual now though, with the Tiled 1.0 release being only a few weeks away, and I’ll certainly be adding a page about Python plugins as well.
