i recommend that you create a virtual environment for yolo. then activate it an use
pip install ultralytics
this command will install all the necessary packages for yolo and you can export your model