What is the best IDE for Python

Business software

Find the right Python IDE

To develop software with Python, you basically only need a text editor and a runtime environment - at least in theory. In practice, however, an IDE with Python support is quite helpful if the result is to go beyond that of a trivial script.

If you already develop software with an IDE, you can probably use it for programming with Python as well, since most of the popular IDEs support the programming language:

  • Both Microsoft IDEs - Visual studio and Visual Studio Code - offer excellent Python support via extensions. If you have already aligned your workflow to these IDEs, you only have to install the appropriate add-ons.

  • Eclipse is mainly used in conjunction with Java, but also supports Python via add-ons. Alternatively, you could also use LiClipse. This is an edition of the Eclipse IDE that has been enriched with numerous pre-installed Python add-ons.

  • Many MacOS users swear by it Sublime TextEditor because of its speed and ease of use. For developers, Sublime Text offers a Python interpreter and many plugins written in Python.

  • Vim and Emacs also offer strong Python support - which can be expanded even further. In the case of Vim with the Python-Mode plugin, in Emacs via addons.

There are also some dedicated IDEs for Python that cover a range of use cases:

  • IDLE comes in a bundle with CPython and is suitable for quickly "throwing" scripts together and for helping beginners with problems.

  • PyCharm is often recommended - and with good reason: The IDE offers support for many native Python tools (e.g. Jupyter Notebooks). PyCharm remains accessible and easy to use.

  • Komodo is the IDE of ActiveState and is therefore particularly suitable for interaction with ActivePython. However, it can also be used with CPython without any problems.

  • Spyder primarily aimed at scientists and statistics experts and less at the general Python developer community.

  1. Product & project manager
    In general, developers don't particularly appreciate it when someone tries to explain to them how to do their job. But because product and project managers often lead development teams, that's exactly what happens. That can lead to discrepancies.

    David Fox from devRant also has an opinion on this: "Ultimately, in most cases, product and project managers are in some way the 'owners' of projects and processes without being involved to know the daily challenges and problems faced by software developers. "
  2. Bosses
    Just like product and project managers, development or engineering managers are responsible for leading teams of developers and ensuring that projects are completed on time and under budget.

    "In some companies, situations can arise where the boss is also a member of the development team. Especially if the boss was a developer himself and becomes boss after a promotion, there is potential for conflict," notes Fox .
  3. Recruiters
    Software developers don't have to actively look for a job themselves in order to be harassed by recruiters and headhunters - thanks to the shortage of skilled workers. It will be very difficult to find a developer who has not yet fallen into the clutches of recruiters.

    David Fox especially sees the persistence of the recruiters as a problem: "They call, email and they just won't leave you alone - even if you're not looking for a job. And even if If you are looking for a job, many recruiters tend to make irrelevant job offers or recommend positions whose profile does not fit at all - for example a job on the other side of the country, even though you are not ready to move. "
  4. documentation
    If there is no documentation, the software developers complain. If it's too much, they complain, and if they have to do the documentation themselves, too. Even the developers are complaining about the way other people handle the documentation task.

    At this point, all developers finally agree, as Fox emphasizes: "Software developers want detailed, well-written and accurate documentation - but they don't want to do it themselves."
  5. Meetings
    Meetings are a problem not only for everyone else, but also for software developers. Especially when it comes to completely unnecessary, time-consuming and utterly boring get-togethers. As Fox explains, devotional items with the inscription 'I survived another meeting that should have been an email' are now also available.
  6. Coworking spaces
    With the rise of agility, flat hierarchies, collaboration and teamwork have become part of everyday life in companies - especially for software development teams. But it is precisely these people who usually find it difficult or impossible to cope with their work in an open-plan office - at least that's what the devRant figures say.

    David Fox explains: "There are just too many distractions: colleagues are chatting, meetings are missed, phone calls are missed. There are also a number of complaints about coffee in the office and other amenities - or that Opposite of that. "
  7. colleagues
    Self-explanatory: everyone has a colleague whom they particularly value. Not.

    In the case of software developers, the aversion to colleagues is usually based either on the poor quality of their work or an ego that is completely out of synch, reveals David Fox.
  8. Job interviews
    When a software developer is looking for a job and is invited to an interview, there is usually something to complain about afterwards:

    "The developers get just as angry as one with stupid questions or the solution of completely unpractical tasks in the job interview Interlocutor who doesn't even know what a developer is actually doing, "says Fox.
  9. Errors & bugs
    Software developers deal with errors and bugs day in and day out. That's why devRant founder Fox believes that developers think differently on this matter:

    "Most other problems don't get a positive resolution, but bugs and errors can be fixed and that feels good."
  10. Quality assurance
    Quality Assurance (QA) - or quality assurance - is a critical part of software development. Still, software developers often complain about the same things about QA experts as they do about product and project managers, according to Fox.

    "Quality assurance gets its hands on the product or project when the developers have completed it. This is why they often do not understand the hurdles and workarounds the developers had to overcome in the development process. Obviously, it also happens regularly that QA people are asking developers to revise areas that they could do themselves. "

Python packages?

If you're using a distribution like ActivePython or Anaconda, many third-party Python libraries are either pre-installed or accessible through a tool. At CPython - and a few others - you don't get these conveniences. The integration of third-party libraries is a bit more difficult here.

The Python Software Foundation stocks a huge collection of libraries: the Python Package Index (PyPI). Each of these packages can be added using the pip command line tool. However, some of these packages require binaries made for specific platforms. And not every PyPI package includes binary files for every platform. Dealing with this problem is not a problem with Linux. Here it is generally possible to create binaries "on the fly". This is not the case with Windows.

One (at least partial) solution comes from Christoph Gohlke from the University of California: He offers an - unofficial - collection of ready-made Windows binaries for many Python packages. Many of the packages are primarily intended for scientific applications or machine learning (e.g. NumPy and TensorFlow). However, many also cover somewhat broader usage scenarios (for example, pillow for image processing or the asynchronous http server Aiohttp).

If you use Windows

For certain Python programming projects, Windows users need a few more movements than users of Linux, MacOS and other Unix-based operating systems. A frequently missing "ingredient" that the Windows developer has to provide is a C compiler. Python needs this for some packages in order to be able to create certain modules that are not available in binary format. For example, Cython translates Python into C code and needs a C compiler to produce working binaries.

The good news: Microsoft's in-house C Compiler already comes with the free Community Edition of Visual Studio. You can also install the Gnu Compiler Collection (GCC). Because the C compiler in Visual Studio is also used for CPython on Windows, its use also promises a more consistent user experience.

The LLVM Compiler Framework is a third-party add-on that is typically not included as standard, but that you might still need. Some Python projects like Numba use LLVM.

Last but not least, Windows users also have to do without revision control software such as Git by default. As a result, some IDEs may refuse to work. This is why you should either download Git for Windows manually or install it through Chocolatey.

Keep your Python code clean

Most programming languages ​​offer functions such as static code analysis or "syntax standardization". In Python, a collection of packages does this. All major IDEs offer support for this, so it makes sense to add them to your workplace.

PEP 8 is a Python code style guide. If you want to apply its rules to your code base, the autopep8 tool does this automatically, aligns your Python program code and displays warnings if certain points in the code require attention. Most IDEs that support Python accept autopep8 as the default formatter.

A new project in terms of code formatting is yapf. This tool, originally developed by Google, completely formats your documents and removes all existing formatting (and reformatting) that were made according to PEP8 rules.

Dynamic programming languages ​​like Python allow developers to minor bugs. In the case of Python, there are supporting tools to prevent this. For example Pylint, which has long been considered the tool for static data analysis in Python, or Mypy.

Create Python project templates

If you find yourself creating the same projects over and over again, save yourself some nerves and time and create a template. There are several ways to do this: For example, by creating a Git repository that you update continuously.

With Python, however, you can take this a little further - with Cookiecutter. New Python projects can be "bootstrapped" with a cookie cutter template. These templates can in turn be saved at Git and also cloned on request. Also, chances are there is already a cookiecutter template in place to get your project up and running. Incidentally, templates that you have created yourself can also be shared.

Programming with Python in virtual environments

The more Python projects you start, the more libraries are used. Example: You want to keep a legacy project that builds on an old version of something and at the same time build a replacement that builds on the newer versions of the same libraries.

With Python, there is a way around this problem: virtual environments. Because they allow a project folder to keep its own local copies of the libraries, the versions of which are newer than those installed on the interpreter. Most of the work is done by the command line tool virtualenv, which also enables switching between different virtual environments. The virtualenvwrapper tool can be used to automate the creation of virtual environments. The chances that your IDE supports virtual Python environments are good - as the example of PyCharm shows.

An alternative to virtual environments is to use a standalone installation of the Python runtime environment. CPython for Windows can for example be downloaded as an "embeddable zip file" and then comes with its own minimal installation of Python. If you want to test certain functions in different versions of a runtime environment for Python and do not want to install each version separately, this solution is made for you.

Support other Python beginners

If you've created a Python project that you think might be useful to other users: Share it with the community! (fm)

This article is based on a contribution from our US sister publication infoworld.com.