The same problem happened to me. It is due to incompatibility of python packages. missingpy is incompatible with the last version of python package.
Precisely the private function _check_weights does not exist anymore in neighbors._base.py in the last version of scikit-learn.
Furthemore, if you have a virtual environment, open the directory ".venv/lib/python3.13/site-packages/missingpy/knnimpute.py", you can see that _check_weights is imported from sklearn.neighbors.base and not from sklearn.neighbors._base.
This means that missingpy is not maintain anymore.
If you want to use it, you need to uninstall the newest version of scikit-learn :
And install one of the latest version of scilit-learn which is compatible with missingpy. For example you can install a version <= 1.1. For example :
pip install scikit-learn==1.1
Finally use the following commands.
import sklearn.neighbors._base
sys.modules['sklearn.neighbors.base'] = sklearn.neighbors._base
from missingpy import MissForest