diff --git a/esp8266/main.c b/esp8266/main.c
index 518ecf17d248eda40ce3bfcb37b4d4fdfd9b57f4..45ee85ac88a4ddd363912dd358bbebef0cce0a88 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -47,6 +47,9 @@ STATIC void mp_reset(void) {
     gc_init(heap, heap + sizeof(heap));
     mp_init();
     mp_obj_list_init(mp_sys_path, 0);
+    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
+    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
+    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
     mp_obj_list_init(mp_sys_argv, 0);
     #if MICROPY_VFS_FAT
     memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount)));
diff --git a/esp8266/qstrdefsport.h b/esp8266/qstrdefsport.h
index d875d8d2a1742e3e0a9a83e1ac0c2547ba7e7347..7610eb33da53266b2e723a6b4cea50b70fbbb220 100644
--- a/esp8266/qstrdefsport.h
+++ b/esp8266/qstrdefsport.h
@@ -25,3 +25,7 @@
  */
 
 // qstrs specific to this port, only needed if they aren't auto-generated
+
+// Entries for sys.path
+Q(/)
+Q(/lib)