diff --git a/README.md b/README.md
index 7653682d882398bb9e221ca0c91769fb13c2a412..ae51720fe0ce922d39c6b97b184f57645abe233c 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,10 @@ Several presentations were done, the materials can be found on the [wiki](https:
 Prerequisites:
   - an internet connexion (with access to the github servers) is needed only for the installation
   - python > 3.7 (but only tested with version 3.10)
+  - some python packages:
+    - numpy and pandas for the testprogs
+    - epygram and matplotlib for AROME
+    - xarray for Meso-NH
   - a C compiler (tested with cc 11.4.0)
   - a FORTRAN compiler (tested with ifort and gfortran, but automatic installation only works with gfortran >= 10)
   - some classical unix tools: wget, tar, make and git
diff --git a/tools/compare.py b/tools/compare.py
index a6f241ec5d941129c004c180df1b7fb2a9bf9353..215039faff3bd0a92b312aaf1898c4a0246d26ac 100755
--- a/tools/compare.py
+++ b/tools/compare.py
@@ -1,13 +1,9 @@
 #!/usr/bin/env python3
 
-import matplotlib
-matplotlib.use('Agg')
 import os
 os.environ['NUMEXPR_MAX_THREADS'] = '1'
 import shutil
 import numpy
-import matplotlib.pyplot as plt
-import xarray as xr
 import sys
 import subprocess
 import difflib
@@ -31,6 +27,7 @@ avail_groups=['Stations/sta1',
               'Budgets/RG','Budgets/RS','Budgets/RH','Budgets/TK']
 
 def compareBACKUPFiles(file_user, file_ref):
+  import xarray as xr
   status = 0
   da = xr.open_dataset(file_user)
   da2 = xr.open_dataset(file_ref)
@@ -71,6 +68,7 @@ def compareBACKUPFiles(file_user, file_ref):
   return status
 
 def compareTSERIESFiles(file_user, file_ref, tol_ad=1E-12):
+  import xarray as xr
   status = 0
   da = xr.open_dataset(file_user)
   da2 = xr.open_dataset(file_ref)
@@ -120,6 +118,9 @@ def compareTSERIESFiles(file_user, file_ref, tol_ad=1E-12):
   return status
 
 def comp_DDH(filename1, filename2, output_fig, tol_ad=3E-7, tol_rd=1.E-6, verbose=False):
+    import matplotlib
+    matplotlib.use('Agg')
+    import matplotlib.pyplot as plt
     import epygram
     epygram.init_env()