importError: no module named _winreg python3

后端 未结 4 1138
遥遥无期
遥遥无期 2021-01-03 21:37

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

相关标签:
4条回答
  • 2021-01-03 22:00

    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.

    Downloading Successfully 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.

    0 讨论(0)
  • 2021-01-03 22:03

    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.

    0 讨论(0)
  • 2021-01-03 22:08

    When you encounter an error like module of simpleai not found, use

    pip install simpleai
    

    in the prompt and then execute. It will get installed.

    0 讨论(0)
  • 2021-01-03 22:09

    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>
    0 讨论(0)
提交回复
热议问题