Obtain one and two particle density matrix for ccsd(T)

I am using Pyscf to obtain the 1-particle and two-particle density matrix from a full ccsd/ccsd(T) calculation using custom basis set. The problem is huge memory requirement for CC runs by PySCF, (also read here) which I can not afford.
I am using this way to obtain the density matrices,

from pyscf import gto, scf, cc,ao2mo,grad,lib,tools
mol=gto.M(molecular specification)
mf = scf.RHF(mol)
mf.conv_tol = 1e-13
mf.scf()
HFdm1 = mf.make_rdm1()
mcc = ccsd.CCSD(mf)
mcc.conv_tol = 1e-12
ecc, t1, t2 = mcc.kernel()
eris = mcc.ao2mo()
e3ref = ccsd_t.kernel(mcc, eris, t1, t2)
l1, l2 = ccsd_t_lambda.kernel(mcc, eris, t1, t2)[1:]
print(ecc, e3ref)
eri_mo = ao2mo.kernel(mf._eri, mf.mo_coeff, compact=False)
nmo = mf.mo_coeff.shape[1]
eri_mo = eri_mo.reshape(nmo,nmo,nmo,nmo)
dm1 = make_rdm1(mcc, t1, t2, l1, l2, eris=eris)
dm2 = make_rdm2(mcc, t1, t2, l1, l2, eris=eris)

Actually, I need those 1-pdm and 2-pdm to be written as a file. Are there any modules in PSI4 that can make those density matrices? I have hope that PSI4 is not that memory hungry.
Thank You