--- a/plugins/python/meson.build
+++ b/plugins/python/meson.build
@@ -23,8 +23,10 @@
   install_dir: join_paths(get_option('libdir'), 'hexchat/python')
 )
 
+wpthread_dep = cc.find_library('winpthread')
+
 shared_module('python', python3_source,
-  dependencies: [hexchat_plugin_dep, python_dep],
+  dependencies: [hexchat_plugin_dep, python_dep, wpthread_dep],
   install: true,
   install_dir: plugindir,
   name_prefix: '',
