i have run a code of django on windows 10 but the same code gives error when try to run on windows 11
It would be a lot easier to help you if we could actually see that error too…
Regardless, the action being taken (the thing you the user are doing, whatever that may be) to run your code on Windows 10, on Windows 11 is not finding a Python environment with the app and all its deps correctly installed. This could be for any number of reasons:
- The venv doesn’t have the deps installed successfully
- No venv is activated
- No venv is created
If using the system Python (don’t), the problem could also be:
- Python is installed but not on %PATH%
- No Python is found by the action you’re doing to run your code
- No Python is installed
- VS Code is not configured correctly to launch a system Python or venv on Windows 11 the same as it was on Windows 10.
- Nightmare platform specific code that for some reason, despite Microsoft’s best efforts at backwards compatibility, is so intricately coupled with Windows internals, it only runs on Windows 10
1 Like
Perhaps enable Windows 11’s Developer Mode too, otherwise you’re stuck with apps from the MS app store.
Hey,
If your Django code works on window 10 but gives error on window 11, usually its because
- May be the python version is different.
- Django or other package missing
- Activate your virtual environment.
- Install all required package then run.
I hope this will help you.