- Your first Python program: Hello, Anaconda!#
- Launching development environment applications from Navigator#
- Open Navigator#
- Run Python in Spyder#
- Run Python in a Jupyter Notebook#
- Close Navigator#
- Write a Python program using a CLI#
- Open your CLI#
- Start Python#
- Write a Python program#
- Exit Python#
- Optional: Launch Spyder or Jupyter Notebook from the command line#
- Spyder Notebook¶
- Installing the Notebook¶
- Using the Notebook¶
- Connecting an IPython Console¶
- Additional Options¶
- Saved searches
- Use saved searches to filter your results more quickly
- License
- spyder-ide/spyder-notebook
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- Spyder Notebook¶
- Installing the Notebook¶
- Using the Notebook¶
- Connecting an IPython Console¶
- Additional Options¶
Your first Python program: Hello, Anaconda!#
This tutorial will take you through a short programming exercise, using Navigator and then a command line interface (CLI).
Launching development environment applications from Navigator#
We will first go through some short exercises using Anaconda Navigator to launch two different integrated development environments (IDEs), Spyder and Jupyter Notebook.
Open Navigator#
Choose the instructions for your operating system:
- Windows — From the Start menu, click the Anaconda Navigator desktop app.
- mcOS — Open Launchpad, then click the Anaconda-Navigator icon.
- Linux — Open a terminal window and use the command anaconda-navigator .
Run Python in Spyder#
More of a visual learner? Follow along with Create a simple Python program in Spyder on Anaconda Learning instead!
- On Navigator’s Home tab, in the applications pane on the right, launch the Spyder IDE from its tile.
Note If Spyder is not installed in your current environment, click Install to install it.
Run Python in a Jupyter Notebook#
More of a visual learner? Watch our short training videos on Jupyter Notebook and JupyterLab on Anaconda Learning instead!
- On Navigator’s Home tab, in the applications pane on the right, launch Jupyter Notebook from its tile.
Note If Jupyter Notebook is not installed in your current environment, click Install to install it.
Close Navigator#
From here, you can close Navigator and move on to the conda CLI tutorial below:
- Windows — Go to File >Quit in the Navigator File menu.
- macOS — Go to Anaconda Navigator >Quit Anaconda-Navigator in the top menu.
Write a Python program using a CLI#
Open your CLI#
There are many command line interface (CLI) options available to you. Anaconda recommends that Windows users use Anaconda Prompt, while macOS and Linux users are welcome to use whatever CLI they are comfortable with.
macOS and Linux users — If you aren’t seeing (base) in your chosen CLI, you need to either initialize conda or activate your base environment. See either the macOS or Linux install instructions for more information.
Start Python#
In your CLI, type python and press Enter or return.
A >>> appears in your CLI and means you are in the Python interpreter, which allows you to run simple scripts right from the command line.
Write a Python program#
At the >>> , type print(«Hello, Anaconda!») and press Enter or return.
When you press Enter or return, your program runs. The words “Hello, Anaconda!” print to the screen. You’re programming in Python!
Exit Python#
Optional: Launch Spyder or Jupyter Notebook from the command line#
- In your CLI, type spyder and press Enter or return. Spyder opens just like it does when launched from Anaconda Navigator.
- In your CLI, type jupyter-notebook and press Enter or return. Jupyter Notebook opens in a tab in your browser.
You can run the same exercises in Run Python in Spyder and Run Python in a Jupyter Notebook after opening Spyder and Jupyter Notebook from your CLI.
Should I use Anaconda Distribution or Miniconda?
Spyder Notebook¶
Spyder-notebook is a plugin that allows you to open, edit and interact with Jupyter Notebooks right inside Spyder.
Using notebooks inside Spyder allows you to take advantage of their web interface alongside Spyder’s powerful features such as the Variable explorer, console and debugger.
Installing the Notebook¶
If you installed Spyder using conda, the best way to install Spyder-notebook is to run the following command in your terminal or Anaconda prompt on Windows:
conda install spyder-notebook -c conda-forge
At the moment it is not possible to use this plugin with the Spyder Standalone installers for Windows and macOS. We’re working to make that possible in the future.
Restart Spyder in order to be able to use the plugin.
Using the Notebook¶
When the Notebook is installed, it will be available under the menu item View ‣ Panes ‣ Notebook .
You will see it then as a tab in the bottom of the editor area. When switching to it, a welcome screen will be displayed, from where you can create a new notebook by right-clicking it and selecting New notebook .
You can also click the Plus button at the top right of the pane. A new Jupyter Notebook will be opened as a tab, ready for user input in a temporary file. This can serve as a scratch pad where you can do quick calculations and plots.
To save this notebook go to the options menu at the top right of the pane and click the Save as… option. This will store your notebook locally with the ipynb extension, which will allow you to open it then as a Jupyter Notebook outside of Spyder.
You can also open any Jupyter Notebook inside Spyder. For this go to the options menu at the top right of the pane and click Open , which will allow you to look for ipynb files in your computer. Click any notebook that you want to open inside Spyder and you will be able to see it as a new tab in the Notebook pane.
The Open recent option displays a list of the recent notebooks you opened in Spyder, from which you can select them and open them again in Spyder.
Connecting an IPython Console¶
You can connect an IPython Console to your notebook, which will allow you to view your variables in the Variable Explorer . To do so, go to the options menu and click the Open console option. This will open a new console with the same name of your notebook and display the variables of the cells that you have executed previously in your Notebook. If you don’t see them, press Enter in the console.
You can view, modify and create new ones in the console too.
Since the Variable Explorer is associated to each console, closing the notebook’s console will immediately hide the variables from the Variable Explorer.
Additional Options¶
The context menu, available by right-clicking the pane area outside the notebook, allows you to zoom your notebook in or out.
You can also select the code from your Notebook and copy it on your clipboard to paste this code anywhere you want.
Finally, you can see all the server information of your notebook by clicking the Server info option in the context menu.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Jupyter notebook integration with Spyder
License
spyder-ide/spyder-notebook
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Spyder plugin to use Jupyter notebooks inside Spyder. Currently it supports basic functionality such as creating new notebooks, opening any notebook in your filesystem and saving notebooks at any location.
You can also use Spyder’s file switcher to easily switch between notebooks and open an IPython console connected to the kernel of a notebook to inspect its variables in the Variable Explorer.
To install this plugin, you can use either pip or conda package managers, as follows:
Using conda (the recommended way!):
conda install spyder-notebook -c conda-forge
pip install spyder-notebook
Note: At the moment it is not possible to use this plugin with the Spyder installers for Windows and macOS. We’re working to make that a reality in the future.
Visit our CHANGELOG file to know more about our new features and improvements.
Development and contribution
See the Contributing Guide for information on how to contribute to the Spyder notebook plugin, including instructions for setting up a development environment.
You can ask your questions at the Spyder group or create a issue in this repo. We will be more than glad to answer.
Spyder and its subprojects are funded thanks to the generous support of
and the donations we have received from our users around the world through Open Collective:
About
Jupyter notebook integration with Spyder
Spyder Notebook¶
Spyder-notebook is a plugin that allows you to open, edit and interact with Jupyter Notebooks right inside Spyder.
Using notebooks inside Spyder allows you to take advantage of their web interface alongside Spyder’s powerful features such as the Variable explorer, console and debugger.
Installing the Notebook¶
If you installed Spyder using conda, the best way to install Spyder-notebook is to run the following command in your terminal or Anaconda prompt on Windows:
conda install spyder-notebook -c spyder-ide
At the moment it is not possible to use this plugin with the Spyder Standalone installers for Windows and macOS. We’re working to make that possible in the future.
Restart Spyder in order to be able to use the plugin.
Using the Notebook¶
When the Notebook is installed, it will be available under the menu item View ‣ Panes ‣ Notebook .
You will see it then as a tab in the bottom of the editor area. When switching to it, a welcome screen will be displayed, from where you can create a new notebook by right-clicking it and selecting New notebook .
You can also click the Plus button at the top right of the pane. A new Jupyter Notebook will be opened as a tab, ready for user input in a temporary file. This can serve as a scratch pad where you can do quick calculations and plots.
To save this notebook go to the options menu at the top right of the pane and click the Save as… option. This will store your notebook locally with the ipynb extension, which will allow you to open it then as a Jupyter Notebook outside of Spyder.
You can also open any Jupyter Notebook inside Spyder. For this go to the options menu at the top right of the pane and click Open , which will allow you to look for ipynb files in your computer. Click any notebook that you want to open inside Spyder and you will be able to see it as a new tab in the Notebook pane.
The Open recent option displays a list of the recent notebooks you opened in Spyder, from which you can select them and open them again in Spyder.
Connecting an IPython Console¶
You can connect an IPython Console to your notebook, which will allow you to view your variables in the Variable Explorer . To do so, go to the options menu and click the Open console option. This will open a new console with the same name of your notebook and display the variables of the cells that you have executed previously in your Notebook. If you don’t see them, press Enter in the console.
You can view, modify and create new ones in the console too.
Since the Variable Explorer is associated to each console, closing the notebook’s console will immediately hide the variables from the Variable Explorer.
Additional Options¶
The context menu, available by right-clicking the pane area outside the notebook, allows you to zoom your notebook in or out.
You can also select the code from your Notebook and copy it on your clipboard to paste this code anywhere you want.
Finally, you can see all the server information of your notebook by clicking the Server info option in the context menu.