The shortlist
12 Python Libraries Worth Your Time
There are hundreds of thousands of packages on PyPI. These twelve cover almost everything people actually build with Python — data, machine learning, web apps and desktop tools.
- 12 libraries
- 870+ tutorials
- All free and open source
1pip install numpy 2pip install pandas 3pip install matplotlib 4pip install scikit-learn 5pip install tensorflow 6pip install keras
Before you pick one
How to Use This Page
A library is just someone else’s code, packaged so you can use it without writing it yourself. The twelve below are the ones that come up again and again in real Python work, and none of them cost anything.
Learn one at a time
The most common mistake is installing five libraries in a week and understanding none of them. Pick the one your current project needs, use it until you are comfortable, then add the next. Depth in Pandas is worth far more than a passing familiarity with everything on this page.
Order matters more than you think
Several of these build directly on each other. Pandas assumes NumPy, Keras sits on TensorFlow, and every machine learning library expects you to already handle arrays and tables comfortably. Taking them out of order is the usual reason people conclude a library is confusing when the real gap is the one underneath it.
Installing is the easy part
Nearly all of them install with pip install name, and two of them ship with
Python already. Do it inside a virtual environment so each project keeps its own versions,
which saves the afternoon you would otherwise lose to a version conflict later on.
Start from the goal
What Do You Want to Build?
Pick the outcome and the library list gets short very quickly. You do not need all twelve, and nobody learns them in parallel.
The twelve
Every Library, What It Does, Where to Start
Roughly in the order most people meet them. Each card says what the library is for, when to reach for it, and three tutorials to open first.
-
The array that everything else is built on
Best for: Anyone touching numbers, arrays or matrices
NumPy gives you the
ndarray, a fast, memory-efficient array that replaces dozens of lines of pure Python with one. Operations that would need a loop happen across the whole array at once, and because the work drops into compiled C underneath, the same calculation can run hundreds of times faster than the list version. Almost every other library on this page is built on top of it, so time spent here is not spent once: Pandas DataFrames, Matplotlib plots and scikit-learn models are all NumPy arrays wearing different hats.Worth knowing: Shapes and views are what catch people out. Every array has a shape tuple that has to line up before two arrays can be combined, and slicing gives you a view into the original rather than a copy, so writing to the slice changes the array you started with.
$pip install numpy45 tutorials Explore NumPy -
The table you actually work in all day
Best for: Data analysts and anyone with spreadsheet-shaped data
Pandas gives you the DataFrame, a two-dimensional table like a spreadsheet or a SQL result, with real tools for loading, cleaning and reshaping it. Reading a CSV is one line, and from there you can filter rows, add computed columns, group and aggregate, join two tables together and pivot the result. In most real projects you will spend more time in Pandas than in anything else on this list, because data is never clean when it arrives.
Worth knowing: Expect the first week to go on missing values, wrong dtypes and inconsistent text. That is not you doing it badly. Cleaning genuinely is most of the job, and those tools are the part of Pandas worth learning properly.
$pip install pandas96 tutorials Explore Pandas -
Complete control over every chart element
Best for: Anyone who has to show findings to other people
Matplotlib is Python’s foundational plotting library, and most other visualization tools are built on top of it. It is not the prettiest by default, which is the usual first complaint, but nothing else gives you this much control: every colour, axis, tick, label, legend and subplot is yours to set. You can have the most accurate model in the world, but if the chart does not make the point clearly, nobody acts on it.
Worth knowing: Learn the figure-and-axes way of working rather than the
plt.shortcuts. It is slightly more typing, and it is the difference between fighting the library and directing it once you want more than one plot in an image.$pip install matplotlib243 tutorials Explore Matplotlib -
Classical machine learning, one consistent API
Best for: First stop for prediction, classification and clustering
Every model in scikit-learn follows the same
fitandpredictpattern, so swapping a decision tree for a random forest is a one-line change and comparing five algorithms is a loop. It covers regression, classification and clustering, plus the unglamorous parts around them: splitting data, scaling features, encoding categories and scoring the result honestly. Start here before any deep learning framework, because most business problems are solved by a well-tuned classical model.Worth knowing: The modelling is the easy part. A trustworthy answer depends on splitting the data before you touch it and picking a metric that matches the question, because accuracy on an imbalanced dataset will report a useless model as excellent.
$pip install scikit-learn7 tutorials Explore Scikit-learn -
Deep learning that runs in production
Best for: Neural networks you intend to deploy and scale
TensorFlow is built for the part that comes after the model works: training across multiple GPUs, feeding data efficiently with
tf.data, and serving predictions to real traffic. That production focus is exactly why it feels heavier than the alternatives while you are still learning. Most people now write the model itself in Keras and let TensorFlow do the heavy lifting underneath, which is the combination worth aiming for.Worth knowing: Version confusion causes more trouble than the maths. A great deal of TensorFlow 1.x code is still online and simply will not run, so check that any tutorial you follow is written for TensorFlow 2.
$pip install tensorflow70 tutorials Explore TensorFlow -
The friendliest way to build a neural network
Best for: Your first neural network, and fast prototyping after that
Keras is the high-level API that sits on TensorFlow, and it is the reason deep learning is approachable at all. A working image classifier is a handful of readable lines: stack some layers, compile with an optimizer and a loss, call
fit. If neural networks have always looked like something other people do, this is where that changes, because you can have one training within an hour of starting.Worth knowing: The simplicity hides real decisions. Layer sizes, learning rate and how long to train all matter, and a model that scores brilliantly on training data while failing on anything new is the normal first result rather than a bug.
$pip install keras97 tutorials Explore Keras -
Deep learning that behaves like normal Python
Best for: Research, custom architectures and anything experimental
PyTorch builds its computation graph as the code runs, which sounds academic and turns out to be enormously practical: you can print a tensor halfway through a model, step through it with a debugger and use ordinary Python control flow inside a network. That is why most new research ships as PyTorch code, and why anyone building something that is not a standard architecture tends to end up here.
Worth knowing: You write the training loop yourself rather than calling
fit. It is more code than Keras, and it is the reason you always know exactly what your model is doing.$pip install torch32 tutorials Explore PyTorch -
The scientific toolbox on top of NumPy
Best for: Optimization, statistics, signal processing and integration
SciPy adds the specialist algorithms NumPy deliberately leaves out. Curve fitting, minimization, statistical tests, interpolation, signal filters and numerical integration all live here, organised into submodules such as
scipy.optimizeandscipy.stats. You reach for it at the point where the maths stops being arithmetic on arrays and starts being a method with a name.Worth knowing: Each submodule is close to a separate library with its own conventions. Learn the one your problem needs rather than working through SciPy as a whole, which is a far bigger undertaking than it first appears.
$pip install scipy44 tutorials Explore SciPy -
A full web framework with the boring parts done
Best for: Database-backed web apps and REST APIs
Django ships with the pieces every web app needs already written: an ORM so you write Python instead of SQL, an admin panel generated from your models, user accounts with passwords handled properly, forms, sessions and sensible security defaults. A working site with a login and a database is a first-day task rather than a first-month one. It is opinionated on purpose, and that is exactly what makes it quick to build with.
Worth knowing: The learning curve is front-loaded. Models, views, templates and URLs all have to click together before any of it makes sense, and then it becomes straightforward, so push through the first project rather than judging it on day two.
$pip install django88 tutorials Explore Django -
A desktop window with no install at all
Best for: Small internal tools and your first GUI
Tkinter ships with Python, so there is nothing to install and a working window with a button is about five lines. It will not win design awards, and for a tool three colleagues will run on an internal machine that matters far less than being able to hand it over this afternoon. It is also the gentlest introduction to how graphical programs are structured, with widgets, layout and an event loop.
Worth knowing: Layout is where people struggle. Pick one geometry manager, usually
grid, and use it consistently, because mixingpackandgridin the same container silently refuses to work.Already in Python — nothing to install87 tutorials Explore Tkinter -
Desktop apps that look professionally built
Best for: Software you intend to ship to real users
PyQt6 wraps Qt, the toolkit behind a lot of commercial desktop software, and it shows. You get native-looking widgets, proper tables and tree views, dialogs, theming and Qt Designer for laying screens out visually. If the application is going to real users rather than three colleagues, the extra effort over Tkinter pays for itself in how finished the result looks.
Worth knowing: Two things to weigh before committing: the API is large enough that you will live in the documentation for a while, and the licensing is worth reading properly if the software is commercial.
$pip install PyQt627 tutorials Explore PyQt6 -
Loops and functions you can watch happen
Best for: Absolute beginners, and teaching anyone else
Turtle draws on screen as your code runs, so a loop stops being an abstraction and becomes a shape appearing line by line. Change the number in
range()and the picture changes with it, which makes the connection between code and effect immediate in a way that printing numbers never quite manages. It is in the standard library, and it is the fastest way to convince a beginner that this is worth learning.Worth knowing: It is a teaching tool rather than a graphics library. Once loops, functions and parameters have clicked, move on, because there is nothing further to get from it.
Already in Python — nothing to install41 tutorials Explore Turtle
Side by side
All Twelve at a Glance
The “learn after” column is the one that matters. Taking these out of order is the most common reason people stall.
| Library | Category | Learn after | What you use it for |
|---|---|---|---|
| NumPy | Data & numeric | Python basics | Arrays, matrix maths, the base for everything else |
| Pandas | Data & numeric | NumPy | Tables, cleaning, grouping, joining, CSV and Excel |
| Matplotlib | Visualization | NumPy | Line, bar and scatter charts you control completely |
| SciPy | Data & numeric | NumPy | Optimization, statistics, signal processing, integration |
| Scikit-learn | Machine learning | NumPy + Pandas | Regression, classification, clustering, model scoring |
| Keras | Machine learning | Scikit-learn | Neural networks in a few readable lines |
| TensorFlow | Machine learning | Keras | Training at scale and serving models in production |
| PyTorch | Machine learning | Scikit-learn | Research, custom architectures, easy debugging |
| Django | Web | Python basics + OOP | Database-backed web apps, admin, auth, REST APIs |
| Tkinter | Desktop & GUI | Python basics | A desktop window with nothing to install |
| PyQt6 | Desktop & GUI | Tkinter or OOP | Professional desktop software with native widgets |
| Turtle | Desktop & GUI | Nothing | Watching loops and functions happen on screen |
One at a time
Which Should You Learn First?
Three orders that work. Finish one library well enough to build something small with it before moving to the next.
-
Data analysis
Typically 3 to 4 months part time- NumPyArrays and vectorised maths
- PandasDataFrames, cleaning, grouping
- MatplotlibCharts that explain the result
- SciPyStatistics and curve fitting
-
Machine learning
Typically 6 to 9 months part time- NumPy + PandasFinish the data track first
- Scikit-learnClassical models end to end
- KerasYour first neural networks
- TensorFlow or PyTorchPick one and go deep
-
Apps and tools
Typically 3 to 5 months part time
Common questions
Questions People Ask Before Starting
How many Python libraries should I actually learn?
Far fewer than you think. A working data analyst uses NumPy, Pandas and Matplotlib every day and touches the rest occasionally. A backend developer may only ever need Django well. Three libraries used confidently will take you further than twelve you have skimmed.
Which Python library should I learn first?
NumPy, if you are heading towards data or machine learning, because Pandas, Matplotlib, SciPy and scikit-learn all sit on top of it. If you are heading towards web development, skip it entirely and start with Django. The answer depends on the goal, not on the library.
Do I need to finish learning Python before using libraries?
You need the basics: variables, loops, functions, lists and dictionaries, and enough object-oriented programming to know what a method call is. You do not need to be an expert. Most people learn the remaining core Python while working through their first library, which is a perfectly good way round.
What is the difference between TensorFlow, Keras and PyTorch?
Keras is the friendly front end and TensorFlow is the engine underneath it, so they are usually used together rather than chosen between. PyTorch is the alternative to that whole stack. Learn Keras first, then pick up PyTorch if you move into research or need architectures that do not fit a standard mould.
Are these libraries free for commercial use?
All twelve are free and open source. PyQt6 is the one to check before shipping commercially, because Qt is offered under more than one licence and the terms differ. The rest carry permissive licences that are fine for commercial work.
Should I install libraries globally or in a virtual environment?
In a virtual environment, always. Two projects will eventually need different versions of the same package, and a global install makes that a problem you have to solve rather than one that never happens. It is one extra command at the start of a project.
Before the libraries
None of This Works Without the Basics
Every library here assumes you are comfortable with variables, loops, functions and lists. If any of that is shaky, fix it first — it takes about a month and it makes everything after it faster.