--- a/scripts/reset-admin.sh
+++ b/scripts/reset-admin.sh
@@ -51,5 +51,5 @@ export SEAFILE_CONF_DIR=${default_seafil
 export SEAFILE_CENTRAL_CONF_DIR=${central_config_dir}
 export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3.6/site-packages:${INSTALLPATH}/seafile/lib64/python3.6/site-packages:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH
 
-manage_py=${INSTALLPATH}/seahub/manage.py
+manage_py=${INSTALLPATH}/seahub/manage.pyc
 exec "$PYTHON" "$manage_py" createsuperuser
--- a/scripts/seahub.sh
+++ b/scripts/seahub.sh
@@ -22,7 +22,7 @@ default_seafile_data_dir=${SEAFILE_UCI_D
 central_config_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf
 seafile_rpc_pipe_path=${SEAFILE_UCI_SOCKET_DIR-$INSTALLPATH/runtime}
 
-manage_py=${INSTALLPATH}/seahub/manage.py
+manage_py=${INSTALLPATH}/seahub/manage.pyc
 gunicorn_conf=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/gunicorn.conf.py
 pidfile=${SEAFILE_UCI_PID_DIR-$TOPDIR/pids}/seahub.pid
 errorlog=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs}/gunicorn_error.log
--- a/scripts/setup-seafile-mysql.py
+++ b/scripts/setup-seafile-mysql.py
@@ -1083,7 +1083,7 @@ class SeahubConfigurator(AbstractConfigu
         fp.write('# -*- coding: utf-8 -*-')
 
     def write_secret_key(self, fp):
-        script = os.path.join(env_mgr.install_path, 'seahub/tools/secret_key_generator.py')
+        script = os.path.join(env_mgr.install_path, 'seahub/tools/secret_key_generator.pyc')
         cmd = [
             Utils.get_python_executable(),
             script,
--- a/scripts/setup-seafile.sh
+++ b/scripts/setup-seafile.sh
@@ -519,7 +519,7 @@ gen_seafdav_conf;
 # generate seahub/settings.py
 # -------------------------------------------
 dest_settings_py=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/seahub_settings.py
-seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.py
+seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.pyc
 
 if [[ ! -f ${dest_settings_py} ]]; then
     key=$($PYTHON "${seahub_secret_keygen}")
