diff --git a/cmake/toolchain/heptools-dev-base.cmake b/cmake/toolchain/heptools-dev-base.cmake
index 6a572d0c8d7eb4e1eb6d5b3d11c1722645998074..c1bab570790c49e89e991f1b6f27a2dfc901b5b0 100644
--- a/cmake/toolchain/heptools-dev-base.cmake
+++ b/cmake/toolchain/heptools-dev-base.cmake
@@ -33,6 +33,7 @@ LCG_external_package(alabaster         0.7.12
 LCG_external_package(alpaka            0.9.0                                    )
 LCG_external_package(altair            5.2.0                                    )
 LCG_external_package(ant               1.10.7                                   )
+LCG_external_package(antlr4_python3_runtime 4.13.1                              )
 LCG_external_package(anyio             3.7.1                                    )
 LCG_external_package(appdirs           1.4.4                                    )
 LCG_external_package(argon2_cffi       20.1.0                                   )
@@ -631,12 +632,13 @@ LCG_external_package(pyroscope         1.2.0
 LCG_external_package(pyroscope_io      0.8.5                                    )
 LCG_external_package(pyrsistent        0.18.0                                   )
 LCG_external_package(pyserial          3.4                                      )
-LCG_external_package(pysimdjson        3.2.0                                    )
+LCG_external_package(pysimdjson        5.0.2                                    )
 LCG_external_package(pystan            3.9.0                                    )
 LCG_external_package(pyshp             2.1.0                                    )
 LCG_external_package(pyshtools         4.12.2                                   )
 LCG_external_package(pyslha            3.2.6                                    )
-LCG_external_package(pytables          3.6.1                                    )
+LCG_external_package(pytensor          2.19.0                                   )
+LCG_external_package(pytables          3.9.2                                    )
 LCG_external_package(pytest            8.0.0                                    )
 LCG_external_package(pytest_cov        4.1.0                                    )
 LCG_external_package(pytest_runner     5.1                                      )
@@ -786,7 +788,6 @@ LCG_external_package(texinfo           6.3
 LCG_external_package(texttable         1.7.0                                    )
 LCG_external_package(textual           0.1.18                                   )
 LCG_external_package(tfs_pandas        3.5.1                                    )
-LCG_external_package(theano            1.0.5                                    )
 LCG_external_package(threadpoolctl     2.2.0                                    )
 LCG_external_package(thrift            0.16.0                                   )
 LCG_external_package(tiff              4.2.0                                    )
@@ -826,7 +827,7 @@ LCG_external_package(umesimd           0.8.1
 LCG_external_package(uncertainties     3.1.7                                    )
 LCG_external_package(unigen            2.2                                      )
 LCG_External_package(upandas           0.2.0                                    )
-LCG_external_package(uproot            5.3.4                                    )
+LCG_external_package(uproot            5.3.7                                    )
 LCG_external_package(uproot_browser    0.4.0                                    )
 LCG_external_package(urllib3           1.26.16                                  )
 LCG_external_package(utf8cpp           3.2.3                                    )
diff --git a/pyexternals/CMakeLists.txt b/pyexternals/CMakeLists.txt
index e811a53baeae4b5e6ec9f3e9f58d6d3f234c3f81..f38c5b19ee970f82375e2af6f73a44fd32b4806a 100644
--- a/pyexternals/CMakeLists.txt
+++ b/pyexternals/CMakeLists.txt
@@ -1114,7 +1114,7 @@ LCGPackage_Add(
           COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
   BUILD_IN_SOURCE 1
   DEPENDS Python setuptools
-    IF ${genshi_native_version} VERSION_GREATER_EQUAL 0.7.7 THEN pip ENDIF
+    IF ${genshi_native_version} VERSION_GREATER_EQUAL 0.7.7 THEN pip six ENDIF
 
 )
 #---prctl------------------------------------------------------------------------------------------------------
@@ -3640,6 +3640,18 @@ LCGPackage_Add(
   DEPENDS Python pip
 )
 
+#---msgpack-----------------------------------------------------------------------------------------------
+LCGPackage_Add(
+  msgpack
+  URL ${GenURL}/msgpack-${msgpack_native_version}.tar.gz
+  CONFIGURE_COMMAND <VOID>
+  BUILD_COMMAND <VOID>
+  INSTALL_COMMAND ${MakeSitePackagesDir}
+          COMMAND ${PYTHON} -m pip install ${PySetupOptions} --no-deps .
+          COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
+  BUILD_IN_SOURCE 1
+  DEPENDS Python pip
+)
 
 #---blosc2---------------------------------------------------------------------------
 LCGPackage_Add(
@@ -3653,7 +3665,7 @@ LCGPackage_Add(
           COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
   BUILD_IN_SOURCE 1
   DEPENDS Python setuptools wheel scikitbuild CMake ninja numpy pycpuinfo
-     IF <VERSION> VERSION_GREATER_EQUAL 2.5.1 THEN ndindex ENDIF
+     IF <VERSION> VERSION_GREATER_EQUAL 2.5.1 THEN ndindex msgpack ENDIF
 )
 
 #---blosc---------------------------------------------------------------------------
@@ -4268,28 +4280,30 @@ LCGPackage_Add(
   DEPENDS numpy scipy nose pygments graphviz pydot six pydot_ng
 )
 
+#---pytensor--------------------------------------------------------------------------------------------------------
+LCGPackage_Add(
+  pytensor
+  URL ${GenURL}/pytensor-${pytensor_native_version}.tar.gz
+  ENVIRONMENT HDF5_DIR=${hdf5_home}
+  CONFIGURE_COMMAND <VOID>
+  BUILD_COMMAND <VOID>
+  INSTALL_COMMAND ${MakeSitePackagesDir}
+          COMMAND ${PYTHON} -m pip install ${PySetupOptions} --no-deps .
+          COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
+  BUILD_IN_SOURCE 1
+  DEPENDS Python pip
+)
+
 #---keras------------------------------------------------------------------------------------------------------
 LCGPackage_Add(
   keras
-  IF <VERSION> VERSION_GREATER_EQUAL 2.8.0 THEN
-      DOWNLOAD_COMMAND <VOID>
-      CONFIGURE_COMMAND <VOID>
-      BUILD_COMMAND <VOID>
-      INSTALL_COMMAND ${MakeSitePackagesDir}
-              COMMAND ${PYTHON} ${pip_home}/bin/pip install --no-deps --prefix=<INSTALL_DIR> -i ${lcg_pip_mirror}
-                      keras==<VERSION>
-      BUILD_IN_SOURCE 1
-      DEPENDS Python setuptools pip theano PyYAML six h5py scipy numpy
-  ELSE
-      URL ${GenURL}/Keras-${keras_native_version}.tar.gz
-      CONFIGURE_COMMAND <VOID>
-      BUILD_COMMAND <VOID>
-      INSTALL_COMMAND ${MakeSitePackagesDir}
-              COMMAND ${PYTHON} setup.py install ${PySetupOptions}
-              COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
-      BUILD_IN_SOURCE 1
-      DEPENDS Python setuptools theano PyYAML six h5py scipy numpy
-  ENDIF
+  DOWNLOAD_COMMAND <VOID>
+  CONFIGURE_COMMAND <VOID>
+  BUILD_COMMAND <VOID>
+  INSTALL_COMMAND ${MakeSitePackagesDir}
+          COMMAND ${PYTHON} ${pip_home}/bin/pip install --no-deps ${PySetupOptions} -i ${lcg_pip_mirror} keras==<VERSION>
+  BUILD_IN_SOURCE 1
+  DEPENDS Python setuptools pip PyYAML six h5py scipy numpy
 )
 
 #---keras_preprocessing-------------------------------------------------------------------------------------------
@@ -4422,19 +4436,6 @@ LCGPackage_Add(
   DEPENDS Python setuptools
 )
 
-#---msgpack-----------------------------------------------------------------------------------------------
-LCGPackage_Add(
-  msgpack
-  URL ${GenURL}/msgpack-${msgpack_native_version}.tar.gz
-  CONFIGURE_COMMAND <VOID>
-  BUILD_COMMAND <VOID>
-  INSTALL_COMMAND ${MakeSitePackagesDir}
-          COMMAND ${PYTHON} -m pip install ${PySetupOptions} --no-deps .
-          COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
-  BUILD_IN_SOURCE 1
-  DEPENDS Python setuptools pip
-)
-
 #---grpcio------------------------------------------------------------------------------------------------------------
 
 LCGPackage_Add(
@@ -5930,7 +5931,7 @@ LCGPackage_Add(
           COMMAND ${PYTHON} -m pip install --no-deps ${PySetupOptions} .
           COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
   BUILD_IN_SOURCE 1
-  DEPENDS Python pip dask awkward typing_extensions
+  DEPENDS Python pip dask awkward typing_extensions cachetools
 )
 
 
@@ -7466,7 +7467,7 @@ LCGPackage_Add(
      ENDIF
           COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
   BUILD_IN_SOURCE 1
-  DEPENDS blosc bokeh dask distributed ipywidgets parsl tcut_to_qastle torch
+  DEPENDS blosc bokeh dask distributed ipywidgets parsl tcut_to_qastle torch aiohttp
           awkward cachetools cloudpickle correctionlib fsspec fsspec_xrootd hist py_lz4 lz4 matplotlib mplhep numba numpy packaging pandas pyarrow scipy toml tqdm uproot aiostream dask_awkward dask_histogram
 )
 
@@ -8192,7 +8193,7 @@ LCGPackage_Add(
           COMMAND ${CMAKE_COMMAND} -E chdir faiss/python ${PYTHON} setup.py install ${PySetupOptions}
           COMMAND ${MAKE} install
           COMMAND ${CMAKE_COMMAND} -E copy faiss/python/libfaiss_python_callbacks.so  <INSTALL_DIR>/lib/
-  DEPENDS blas Python numpy swig
+  DEPENDS blas Python numpy swig packaging
   REVISION 2
 )
 
@@ -8609,6 +8610,19 @@ LCGPackage_Add(
   DEPENDS Python pip cloudpickle future networkx numpy py4j scipy six tqdm
 )
 
+#---antlr4_python3_runtime-----------------------------------------------------------------------------------------------------
+LCGPackage_Add(
+  antlr4_python3_runtime
+  URL ${GenURL}/antlr4-python3-runtime-<VERSION>.tar.gz
+  CONFIGURE_COMMAND <VOID>
+  BUILD_COMMAND <VOID>
+  INSTALL_COMMAND ${MakeSitePackagesDir}
+          COMMAND ${PYTHON} -m pip install ${PySetupOptions} --no-deps .
+          COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
+  BUILD_IN_SOURCE 1
+  DEPENDS Python pip
+)
+
 #---openqasm3-----------------------------------------------------------------------------------------------------
 LCGPackage_Add(
   openqasm3
@@ -8619,7 +8633,7 @@ LCGPackage_Add(
           COMMAND ${PYTHON} -m pip install ${PySetupOptions} --no-deps .
           COMMAND ${CMAKE_SOURCE_DIR}/pyexternals/Python_postinstall.sh <INSTALL_DIR>
   BUILD_IN_SOURCE 1
-  DEPENDS Python pip
+  DEPENDS Python pip antlr4_python3_runtime
 )
 
 #---qibo-----------------------------------------------------------------------------------------------------