Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importError: no module named _winreg python3

Where can I download _winreg for python3 if I can at all. I have my 'windir' on E:\Windows. I do not know if cx_Freeze did not notice that. I am using cx_Freeze to create an msi installer.

like image 445
BantuCoder Avatar asked Dec 01 '10 02:12

BantuCoder


2 Answers

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.

like image 63
Velociraptors Avatar answered Nov 10 '22 11:11

Velociraptors


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>
like image 38
np8 Avatar answered Nov 10 '22 12:11

np8