Please start from scratch (rm your FreeFem-sources folder and clone/download again), you are probably trying to do make petsc-slepc
from FreeFEM 4.6, which is obsolete. There is no occurence of env python
in neither FreeFEM nor PETSc, so you are using outdated files. The newer versions are using python3
indeed.