- Can I run Python in a browser without installing anything?
- Yes. PythonMastery uses Pyodide, a WebAssembly version of CPython, to run Python
entirely in your browser. No installation of Python, pip, or any tool is needed.
- Which Python version does it use, and can I change it?
- Python 3.13 by default. In the editor, click the status line above the output
(it says Python 3.13.2 Ready) to switch to Python 3.14, 3.12 or 3.11. The
editor remembers your choice. The lessons, examples, Tutorial Lab and notebook always
run Python 3.13, the version their outputs were checked on.
What changed between the versions.
- Is my Python code private and secure?
- Your code stays private. It runs in your browser and is never sent to our servers, so we have no access to what you write or run. We collect a few basic things, such as page views and any feedback you send, to keep the site working well. The privacy policy lists all of it.
- What Python libraries are available online?
- NumPy, pandas, SciPy, Matplotlib, scikit-learn, XGBoost, LightGBM, statsmodels,
Pillow, SymPy and NetworkX are built into the runtime and need no install at all.
Seaborn, Plotly, Pydantic and hundreds of other pure-Python packages install in
seconds via micropip. PyTorch and TensorFlow are the main exceptions:
neither has a WebAssembly build, so they cannot run in any browser.
- Can I train machine learning models in the browser?
- Yes. scikit-learn runs natively, so you can load a dataset, split it
into train and test, fit a RandomForest or a linear regression, and score it,
all in the tab, with no GPU and no account. XGBoost and LightGBM work too. For deep
learning specifically, our
network-from-scratch lesson trains a
two-layer neural network in NumPy to 97% accuracy on handwritten digits in about a
second.
- Can I upload my own CSV or dataset?
- Yes. Press Upload and pick a CSV, JSON, Excel sheet, image,
PDF or a whole project as a
.zip. You can pick several at once.
The file lands where Python can read it by name, so
open("sales.csv") works with no path and nothing
imported, and pd.read_csv("sales.csv") works too. pandas loads by
itself when you import it. You can then clean it, chart it, and train a model on it. The
working with your own data
lesson walks through the encoding and delimiter traps real exports arrive with.
- Where is my uploaded data stored?
- In your own browser, on your own device. Never on our servers. We have no
upload endpoint and no database. The file is handed to the Python runtime running
inside your tab. It is kept in your browser's storage so it is still there when
you come back tomorrow, and it stays until you remove it: the × on the file,
the Clear data files button, or clearing this site's data in your
browser. That button removes your data files only. Your code, theme and
lesson progress are not changed. Our
privacy policy sets out every way those files
go away.
- Can I write a program with more than one file?
- Yes. Open a tab per file and they import each other, so
import helpers resolves to the helpers.py tab exactly as
it would on your own machine. Download everything as a .zip, or share
the whole project as one link. The code travels inside the link itself, not
through our servers, so we never store anything you share.
- Is there a Jupyter-style notebook?
- Yes. The Notebook gives you cells that share one Python
session, so a DataFrame you load in the first cell is still there in the tenth.
Tables and plots render inline, your work autosaves in the browser, and you can
import or export a standard
.ipynb file. No login.
- Are there datasets to practice on?
- Seven, ready to load with one line: housing prices, daily weather, retail orders,
films, student results, subscription churn, and one deliberately messy signup file
for cleaning practice. See Practice datasets.
- Can I create charts and visualizations in the browser?
- Yes, both still and interactive. Matplotlib works fully, including 3D surface
plots, and renders as high-resolution PNG images inline, with options to
download or copy. Plotly figures render live rather than as pictures: you
can drag to rotate a 3D scatter plot or a loss surface, or zoom into a cluster.
- Does it work on mobile devices?
- Yes. PythonMastery is fully responsive and works on phones and tablets. The editor supports
native touch selection with drag handles, and the layout adapts to portrait and landscape
orientations.
- Can I put runnable Python on my own website or blog?
- Yes. Write the code in the playground, open Share (or Share+ for several files) and
press Embed code: you get one line of HTML that shows a box your readers can
edit and run inside your page. For GitHub there is a “Run in
PythonMastery” README badge. Free, no account, and the code runs in the
reader’s browser. Step-by-step guide.
- Is this Python online compiler free?
- Yes. No paid plans, no feature paywalls, no account. There are no ads today. If they come,
they’ll be labelled and everything stays free.
- Can I learn Python for free here?
- Yes. Python Academy offers structured learning paths from beginner to advanced, covering
Python fundamentals, data science, machine learning and AI. All of it is free and runs in the browser.
Not sure where to start? The Python roadmap puts the paths in
order, from your first line of code to a project you can show an employer.
- I got a Python error I don’t understand. Can you explain it?
- Paste the traceback into the error finder. It takes you to
the page that fixes it (60 common errors are written up), or explains the error and points at
the line of your code to look at. When a run fails in the editor or a lesson, the
Explain this error link does the same in one click. It all runs in your browser.
Your error is sent to us only if you choose to send it.
- Are there printable Python cheat sheets?
- Yes: 15 free one-page PDF cheat sheets, from strings, lists and
dictionaries to regex, dates, type hints and argparse. Every example on them is run against
Python before the sheet is published, and each sheet ends with the mistakes people often make.
Free to print and share.
- Can I use input() in the browser?
- Yes. PythonMastery supports Python's input() function with an inline text field in the
console. You can build interactive programs that ask the user for input, with no pop-ups or
workarounds.
- Can I stop a running Python script?
- Yes. Click the Stop button to interrupt execution at any time. It works for infinite loops,
long computations, and even input() prompts. If a graceful stop isn't possible, the
environment automatically restarts.