7 ms·
Ask HN: Best Free Python Editor?
I recently started working in Python and reached straight for VSCode, because it's been so great for other languages. But its Python plugin is... extremely underwhelming. MyPy/Pylint checks don't run until you save, take several seconds, and don't even place the underlines in the right place; they all end up at the start of the line. Autocomplete support is minimal.
I know PyCharm exists, but is there a free editor that does a better job than VSCode?
Edit: Excluding text-based editors (vi/emacs); I'm not a fan
- rmk 7y agoPyCharm community ed is free. Sublime Text is very good (it's nagware).
- coryalthoff 7y agoThe free version of PyCharm is great.
- s1t5 7y agoMake sure that your VSCode is set up correctly - I'm not experiencing any of the problems that you're describing.
- _bxg1 7y agoI'm using the official Python extension, made by Microsoft itself.
- Glavnokoman 7y agoThat's the thing. VSCode itself is quite good but all MS made extensions I tried are just garbage.
- _bxg1 7y agoThe TypeScript integration is incredible. It's as good as a paid IDE. Python is the only other first-party extension I've used, though.
- eddyg 7y agoDid you add Microsoft's Pyright[0] extension as well? It works hand-in-hand with the Python extension and makes VS Code a fantastic Python editor IMO. You may want to set pyright.disableLanguageServices in settings since there is some overlap in the Pyright and Python extensions that can result in duplicate results. (I'm not sure if you lose any Pyright features when you do this though...) [0] https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright https://marketplace.visualstudio.com/items?itemName=ms-pyrig...
- _bxg1 7y agoNo, I didn't know about that one; the base one has MyPy and Pylint integration so I assumed it was the best version of each that they planned on implementing. I wonder why they would break out the "good version" into a separate extension.
- eddyg 7y agoI've always found pylint to be pretty useless... see for example https://lukeplant.me.uk/blog/posts/pylint-false-positives/ https://lukeplant.me.uk/blog/posts/pylint-false-positives/ I always pip install flake8 in my venvs and the standard Python extension can also use that just fine: "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true,
- _bxg1 7y agoIt's what we use at my workplace; not my call to make
- _bxg1 7y agoJust tried Pyright and it's incredible. Wow; why in the world don't they include this functionality in the regular extension? Thanks so much!
- dragonwriter 7y agoI don't have the exact problems, but I find similar but different problem with both MPLS and Jedi in VSCode, plus VSCode recognizes virtualenvs and tries to use dev support tools like black or mypy from the project venv, but if it's not there it does a user install, which it then still fails to locate. Still, using VSCode for Python is better than using a different editor just for Python, but it's frustrating that so many basic things are almost, but not quite, fully functional.
- ageitgey 7y agoPyCharm Community Edition is open source, free and great.
- dotancohen 7y agoI came here to mention PyCharm. Note that PyCharm also has a VIM plugin that is the best VIM plugin I've used on any editor. It does 95% of what I would do in real VIM.
- AlexCoventry 7y agoIt's been a couple of years since I wrote python seriously, but MyPy/Pylint annotations were showing up nicely in emacs, IIRC.
- jdfellow 7y agoEmacs has been working for me for several years now.
- m1cl 7y agovim with coc.vim and coc-python extention. works great
- pdar4123 7y agoHonestly ppl: vim or emacs - the rest is fluff
- SanchoPanda 7y agoSublime is fluff?
- deleted 7y ago[deleted]
- the_cat_kittles 7y agoyep
- kirubakaran 7y agoOr both, with Spacemacs. I'm all in on Emacs though.
- crimsonalucard 7y agoI had a coworker who couldn't understand why people didn't just use emacs. I figured he was just cocky or he just didn't understand people in general. The huge downside of emacs is it's Huge learning curve. The rest is not fluff because the rest roughly have zero curve.
- samatman 7y agoVim... does not have a zero learning curve. For me, the huge downside of emacs is the not-very-fast single-threaded virtual machine with dynamic scope and one huge global namespace. It does an incredible number of cool things, some of them you can't find anywhere else, but I always end up bailing for an editor where I can reliably type and have characters show up instantly.
- crimsonalucard 7y agoSlight error, yes vim has a learning curve.
- bhaprayan 7y agoNvim + Coc (either MPLS or Jedi, both work good), way faster, and definitely worth the learning curve if you're new to modal text editors :)
- arno_v 7y agoI've been using Atom for a few years, with a few Python plugins it works really nicely!
- _bxg1 7y agoMaybe I'll give Atom a try. I switched from it to VSCode a few years ago because it just wasn't as stable and didn't perform as well, but if the Python support is better it could be worth it.
- zacssite 7y agoI do a lot of Python development, both at work and for fun at home. Can’t recommend Sublime Text enough.
- sdan 7y agoI actually can’t use anything other than sublime. Nothing beats its simplicity and lack of complex buttons.
- mlboss 7y agoAnd speed
- thrownblown 7y agoanaconda package really helps get a lot more ide functionality in Sublime Too
- tjpnz 7y agoI would recommend PyCharm Community Edition. If you're doing web development you will be missing a few nice to haves but the experience otherwise is virtually indistinguishable from the professional edition.
- _bxg1 7y agoI assumed it had a "non-commercial use only" license, but looks like it doesn't! That could be perfect.
- isoprophlex 7y agoI use pycharm daily and have nothing but praise for it. The free edition will probably take you very far, if you want the database features of the paid version there's always DBeaver
- kelsolaar 7y agoSame here, I'm typing that while having it running in the background along with CLion. Some of us benefit from a free license to their entire toolbox via the work on Colour (https://www.colour-science.org/ https://www.colour-science.org/). Their support has been helping us for over half a decade.
- donarb 7y agoThe Community Edition is also open source. https://github.com/JetBrains/intellij-community/tree/master/python https://github.com/JetBrains/intellij-community/tree/master/...
- polskibus 7y agovisual studio community with python tools
- rs23296008n1 7y agoNotepad++ is a good tool. It knows python and mostly gets out of your way. Its not an IDE but has a lot of related functionality. But I certainly edit all my python code with it. Then again, I use command line tools for linting etc. so I don't need a lot built-in to the editor.
- cvaidya1986 7y ago+1 for notepad++
- smitty1e 7y ago> Excluding text-based editors (vi/emacs); I'm not a fan How about both together? => https://www.spacemacs.org/ https://www.spacemacs.org/ The git integration under https://magit.vc/ https://magit.vc/ alone is worth the price of admission.
- tootie 7y agoI'm curious what you switched from that is giving you FOMO right now. If you've mostly worked in strongly-typed languages, you simply can't get the same kind of IDE experience with something like Python. The tools have come a long way and are at least decent now, but will never be as sharp as they will be for languages like C# or Java.
- _bxg1 7y agoCompared to the TypeScript experience in the same editor, the Python experience is terrible. A little bit of that can be attributed to Python's type system being less powerful than TypeScript, but most of it is not. Things like auto-imports, deep autocomplete, instant feedback on the errors it's able to detect, etc should be perfectly doable.
- vendevillem 7y agoSame here, Pycharm community edition, works like a charm ;)
- davidgaleano 7y agoVim with coc-python works very well for me: https://github.com/neoclide/coc-python https://github.com/neoclide/coc-python “Built with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as linting, IntelliSense, code navigation, code formatting, refactoring, snippets, and more!”
- zerr 7y agoPyScripter
- _ZeD_ 7y agodo yourself a favour and try liclipse (or eclipse with pydev) https://www.pydev.org/ https://www.pydev.org/
- vezycash 7y agoOn Windows, Mu Code is best editor for beginners.
- ken 7y agoPython is a text-based language. Aren't all these editors "text-based"? You know you don't have to run Emacs in a terminal emulator, right? It's had mouse support for decades.
- askafriend 7y agoPyCharm is too bloated and under-designed for me. I prefer Atom. Simple, fast, and pretty.
- reactor 7y agohttps://www.spyder-ide.org/ https://www.spyder-ide.org/ quite nice.
- siquick 7y agoHas anyone ever managed to get autoformatting (Prettier etc) working on Django templates in VS Code?