Manual:Pywikibot/2.0/login.py

The script included in  occasionally fails silently. Until that is fixed, the following workaround can help: This sets the PYWIKIBOT2_DIR environment variable before importing pywikibot.