Installing python pip fails on windows 10

All my modules failed to load suddenly after I mistakenly tried to uninstall logging module with pip. Had to reinstall python and pycharm to get them working again. pip not installed nor any modules I need. When I run py get-pip.py that I securely downloaded I get this error:

C:WINDOWSsystem32>py get-pip.py
Traceback (most recent call last):
File "C:WINDOWSsystem32get-pip.py", line 24312, in <module> main()
File "C:WINDOWSsystem32get-pip.py", line 139, in main bootstrap(tmpdir=tmpdir)
File "C:WINDOWSsystem32get-pip.py", line 115, in bootstrap monkeypatch_for_cert(tmpdir)
File "C:WINDOWSsystem32get-pip.py", line 96, in monkeypatch_for_cert from pip._internal.commands.install import InstallCommand
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "C:UsersmeAppDataLocalTemptmp5e65jmwmpip.zippip_internalcommands__init__.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "C:UsersmeAppDataLocalTemptmp5e65jmwmpip.zippip_internalclibase_command.py", line 3, in <module>
File "C:Program FilesPythonPython39Libsite-packageslogging__init__.py", line 618
raise NotImplementedError, 'emit must be implemented '
                         ^
SyntaxError: invalid syntax

pip never installs so I cannot use it to restore the modules I need.