Forums

ModuleNotFoundError: No module named 'winreg'

Hello, this is my first post. Just upgraded my account. Used this command > pip install winregistry to install the module,

but we keep getting the following error. We also Referred to https://help.pythonanywhere.com/pages/DebuggingImportError but did not help

Here's the error we are getting enter image description here

I'm not sure if you installed it for correct python, but anyways winreg would not work as there is no Windows Registry on PythonAnywhere, as it is Linux environment.

@fjl, that is what I am thinking too! But on the other account running pip install winregistry fixed the issue. I am happy to share GitHub link to code base privately if you would like. But just trying to deploy a standard Django app with MySQL and Django Rest Framework. Nothing funky.

14:02 ~ $ workon dev

(dev) 14:02 ~ $ python3 -m django --version

4.1.3

(dev) 14:02 ~ $ python --version

Python 3.9.13

(dev) 14:09 ~ $ pip freeze | grep djangorestframework

djangorestframework==3.14.0

You're trying to import winreg, which you have not installed and will not be able to install. You will need to remove the code that imports and uses winreg.

@glenn : neither I imported nor used it anywhere in my code. I have a pretty basic django application that I am trying to host.

Is it possible that there are some Windows specific settings in your code?