importError: no module named _winreg python3 importError: no module named _winreg python3 python python

importError: no module named _winreg python3


As it says in the _winreg documentation, it has been renamed to winreg in Python 3.0. You should run the 2to3 tool if you're converting code that was written for Python 2.x.


I know this is an old question, but this was the first search result when Googling for ModuleNotFoundError: No module named '_winreg', and perhaps may be helpful for someone.

I got the same error when trying to use a virtual environment folder, which has been created using different (already deleted) python binaries. The solution was recreate the virtual environment:

  1. Delete the virtual environment folder
  2. Run python -m venv <name_of_virtual_environment>


I have found an easy solution for this, Even though i found it after a lot of Rnd, the solution implementation is so simple and straight forward. Hope it can help many people with the same problem.

If you dont have the latest version of Python installed on your machine, You need to download it from (https://www.python.org/downloads/) and then click on Add to path option and just finish the installer.

Please open CMD and move to the python latest version directory, then run the pip install package name (e.g) pip install pygame and it will be successful

1. C:\WINDOWS\system32>cd C:\Users\admin\AppData\Local\Programs\Python\Python37-32    2. C:\Users\admin\AppData\Local\Programs\Python\Python37-32>pip install Pygame 

It will install the packages now without any issues.

DownloadingSuccessfully installed Pygame-1.9.4

C:\Users\admin\AppData\Local\Programs\Python\Python37-32>

If you are still facing issues in Pycharm after trying the above solution, please try the following steps too.

  1. Create new virtual Environment from settings menu and select the latest version of python framework as Project Interpreter and give a new folder path.

  2. select the pip package you want to import. Recompile the code and the error will clear.

Hope this helps.