Sign inGet started
← Back to all guides

How to check the Python version in Jupyter

By Nick Barth

Updated on March 6, 2024

Checking the Python version in Jupyter and Deepnote

When working with Python in Jupyter Notebook or on platforms like Deepnote, it is essential to know which Python version you're using. This information is helpful when installing packages, running scripts, or debugging errors, as these activities can be Python version-specific. Below are the steps to check your Python version easily in Jupyter and Deepnote.

In Jupyter notebook:

  1. Open your Jupyter notebook.
  2. Click on a cell to activate it or create a new one.
  3. Type the following command:

import sys

print(sys.version)

  • Press `Shift+Enter` to execute the cell.
  1. The output will display your current Python version, along with additional details about the build.

In Deepnote:

Deepnote is an online data science notebook with collaborative features. To check the Python version in a Deepnote project:

  1. Navigate to your Deepnote project.
  2. Start a new notebook or open an existing one.
  3. Click into a cell and type the same command as above:

import sys

print(sys.version)

  1. Run the cell by clicking the 'Run' button or typing `Shift+Enter`.
  2. The output will display the Python version that your Deepnote environment is currently using.

Remember that the Python version may vary between different virtual environments, even within the same Jupyter or Deepnote instance. Always make sure to check the Python version within the specific environment where you’re working on your project.

By following these simple instructions, you can easily verify the Python version and ensure your code and tools are compatible with your development environment.

That’s it, time to try Deepnote

Get started – it’s free
Book a demo

Footer

Product

  • Integrations
  • Pricing
  • Documentation
  • Changelog
  • Security

Company

Comparisons

Resources

  • Privacy
  • Terms

© Deepnote