Alternatives to Python

A general-purpose programming language used for scripting, web backends, data analysis and machine learning. The listings below can replace it for an important use case. Each note says what changes if you switch.

The original

Replacements

Listings that take over the same core job as Python.

  • Ruby

    A dynamic, open-source programming language focused on simplicity and programmer productivity.

    Ruby is another readable, dynamic open-source scripting language suited to web development, but it lacks Python's default status in data analysis and machine learning tooling.

  • Perl

    A mature general-purpose scripting language known for text processing, with the large CPAN module archive.

    Perl offers very strong text processing and over 42,000 CPAN distributions, though its terse syntax can be hard to read and it is less common in new projects.

  • Julia

    A fast, dynamically typed programming language for technical and scientific computing.

    Julia compiles to native code via LLVM for fast numerical work with an interactive REPL, but first runs can be slow and its package ecosystem is smaller.

  • Go

    An open-source compiled programming language from Google with built-in concurrency and a module system.

    Go is a compiled language with built-in concurrency and a single toolchain, giving faster programs for services and CLI tools than interpreted Python.

  • R

    A free software environment and language for statistical computing and graphics.

    R focuses on statistical computing and graphics with packages from CRAN and Bioconductor, making it narrower than Python but strong for data analysis and plotting.

  • Lua

    A lightweight, embeddable scripting language with a small standalone interpreter.

    Lua is a small, embeddable scripting language that is quick to learn, but its standard library is much smaller than Python's and official downloads are source only.

  • Node.js

    The JavaScript runtime that server-side JavaScript is built on, with the npm ecosystem behind it.

    Node.js runs JavaScript on servers with the large npm ecosystem, is single-threaded by default, and trades Python's data science tooling for web and tooling reach.

  • Deno

    A JavaScript and TypeScript runtime with security on by default, TypeScript built in, and a complete toolchain in one binary.

    Deno runs TypeScript and JavaScript with permissions denied by default and a built-in formatter, linter and test runner, replacing Python scripts with a sandboxed runtime.

Also worth comparing

These listings name Python as their own alternative, so the relationship runs both ways.

  • .NET

    Microsoft's free, open-source, cross-platform runtime and SDK for building apps in C#, F# and Visual Basic.

    Python trades compiled C# for a readable interpreted language that dominates data and machine learning work, but it runs much slower for CPU-heavy tasks and packaging is often confusing.

  • PHP

    A general-purpose scripting language and interpreter especially suited to web development.

    Python is a general-purpose language with a large standard library and data tooling, used for web backends too, with official Windows and source releases on a yearly schedule.

Similar software

Related functionality, not a direct replacement.