Development Environments

A development environment is a combination of a text editor and a Python runtime environment. The text editor allows you to write the code. The runtime environment implementation such as CPython or PyPy provides the method for executing your code.

tmux plus Vim editor on a dark background.

A text editor can be as simple as Notepad on Windows or more complicated as a complete integrated development environment (IDE) such as PyCharm which runs on any major operating system.

Why is a development environment necessary?

Python code needs to be written, executed and tested to build applications. The text editor provides a way to write the code. The interpreter allows it to be executed. Testing to see if the code does what you want can either be done manually or by unit and functional tests.

While you're learning about development environments be sure to check out information on Vim and Emacs.

An example development environment

Here's what I (the author of Full Stack Python, Matt Makai) use to develop most of my Python applications. I have a Macbook Pro with Mac OS X as its base operating system. Ubuntu 18.04 LTS is virtualized on top with Parallels. My code is written in vim and executed with the Python 3.6 release via the command line. I use virtualenv to create separate Python interpreters with their own isolated application dependencies and virtualenvwrapper to quickly switch between the interpreters created by virtualenv.

That's a common set up but you can certainly write great code with a much less expensive set up or a cloud-based development environment.

Other developers' environments

Often the best way to figure out how to get comfortable in your own development environment is to see examples of how other experienced developers have set up their configurations. The following posts contain the tools, editors and workflows that developers have taken the time to publicly document.

Cloud hosted dev environments

Several cloud-based development environments have popped up over the past several years. These hosted environments can work well when you are learning or stuck on a machine with a web browser but otherwise no administrative privileges to install your own software. Most of these have free tiers for getting started and then require payment as you scale up your application.

  • CodeAnywhere is a cloud IDE that can be used in the web browser or on an iOS or Android device.

  • Cloud9 began as an independent company and is now owned by Amazon as part of Amazon Web Services.

  • code.xyz is an online text editor built by Stdlib that can integrate with external web APIs.

  • GitLab Web IDE is integrated into the GitLab web application for modifying your Git repository files directly in your browser.

General dev environment resources

Development environments are unique to each programmer because Python is used for many different purposes. The following guides range from web development to DevOps and from getting started to data science. Even though your environment requirements are unique, you should be able to find someone who has set up something similar to what you need. Use that configuration as a starting point and customize it from there.

接下来要了解 Vim 和 Emacs,还是转向 Web 框架?

我想学习如何用框架创建 Python Web 应用。

告诉我有关使用 Vim 编辑器进行 Python 开发的信息。

我想学习 Emacs 用来做 Python 编码。

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.