No, but it is preferable. In accordance with article 1359 of the civil code, a writing is required when the sum lent is greater than 1500 €.
The use of a notary is recommended to avoid any dispute, especially between your heirs. Indeed, you are assured that the deed will be perfectly legally worded, it will have a certain date and if the repayment deadlines are not honored, you will be able to make the appropriate seizures without having to obtain a judgment recognizing your claim.
Finally, the notary will take care of the declaration of the loan to the tax services. Indeed, when the loan exceeds €5,000, the borrower must declare it using form no. 2062.