アクセスが拒否されました。

ERROR: Could not install packages due to an OSError: [WinError 5] アクセスが拒否されました。: 'C:\\\\Python312\\\\share'
Consider using the `--user` option or check the permissions.

対処法

インストール時に--userをつける

例 matplotlibインストール時

pip install matplotlib --user

pipインストール時のアクセス拒否の対応メモ - Qiita