Best way to set up Python for Windows these days
Using Powershell to Install Python
I need a beginners guide to setting up windows for python development - Stack Overflow
How can I get Windows and my Python IDE (PyCharm) to use the same Python version?
I just got a new Windows laptop (we have to use Windows at my job). For all my prior laptops, I wound up with a confusing mishmash of the Windows store Python (or stub), several other versions, various path issues and (my fault) various issues with global packages vs. user installed packages vs. virtual environments.
If you were starting over with a new Windows laptop what approach would you use? Just python.org and venv? Should I use uv? Maybe I should use wsl2 instead of native Windows? Or run within Docker containers?
I'd like to get off to a strong start.
It's not that hard to set up a Python environment, and I've never had it muck up my .NET work. Basically, install Python --- I'd use 2.6 rather than 3.0, which is not yet broadly accepted --- and add it to your PATH, and you're ready to go with the language. I wouldn't recommend using a Ubuntu VM as your development environment; if you're working on Windows, you might as well develop on Windows, and I've had no significant problems doing so. I go back and forth from Windows to Linux with no trouble.
If you have an editor that you're comfortable with that has basic support for Python, I'd stick with it. If not, I've found Geany to be a nice, light, easy-to-use editor with good Python support, though I use Emacs myself because I know it; other people like SCITE, NotePad++, or any of a slew of others. I'd avoid fancy IDEs for Python, because they don't match the character of the language, and I wouldn't bother with IDLE (included with Python), because it's a royal pain to use.
Suggestions for libraries and frameworks:
- Django is the standard web framework, but it's big and you have to work django's way; I prefer CherryPy, which is also actively supported, but is light, gives you great freedom, and contains a nice, solid webserver that can be replaced easily with httpd.
- Django includes its own ORM, which is nice enough; there's a standalone one for Python, though, which is even nicer: SQL Alchemy
- As far as a testing library goes, pyunit seems to me to be the obvious choice
Good luck, and welcome to a really fun language!
EDIT summary: I originally recommended Karrigell, but can't any more: since the 3.0 release, it's been continuously broken, and the community is not large enough to solve the problems. CherryPy is a good substitute if you like a light, simple framework that doesn't get in your way, so I've changed the above to suggest it instead.
Well, if you're thinking of setting up an Ubuntu VM anyway, you might as well make that your development environment. Then you can install Apache and MySQL or Postgres on that VM just via the standard packaging tools (apt-get install), and there's no danger of polluting your Windows environment.
You can either do the actual development on your Windows machine via your favourite IDE, using the VM as a networked drive and saving the code there, or you can just use the VM as a full desktop environment and do everything there, which is what I would recommend.
Hi, I've just installed a module in the command prompt and while I can use it with >python in the CMD, PyCharm does not recognize the module. I've only ever downloaded one Python version, the 3.10.5 from the Microsoft Store.
When I use sys.executable in the CMD, I get this python version:
C:\Users\ayram\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe
In the IDE, within the Python interpreter settings, this version is being used:
C:\Users\ayram\AppData\Local\Microsoft\WindowsApps\python3.10.exe
When I click on "Add interpreter", I get those two options:
https://gyazo.com/ecf5f9fda76ae46fc5f3b27906834287
https://gyazo.com/fe6087d7ee60f9f08dbcfc44c11455de
The first one is the one that works and that PyCharm uses, while the second one is the version I see with sys.executable in the CMD. When I try to use the second one, I get this error:
Cannot set up a python SDK at Python 3.11 (C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\python.exe). The SDK seems invalid.
Any help is much appreciated, thank you