-
Notifications
You must be signed in to change notification settings - Fork 294
Module Dependencies
This page describes the different python modules needed by the Jupyter Extension.
The Jupyter Extension requires these different modules:
Module | What it's used for |
---|---|
jupyter | When there's no ZMQ support, we install the 'jupyter' module |
notebook | Jupyter is supposed to come with the notebook module but it can sometimes be missing it. The notebook module is responsible for starting a server and providing the notebook api |
ipykernel | The ipykernel module is an implementation of a Jupyter kernel. It's needed to run a python based kernel |
nbconvert | nbconvert is a cli tool for converting notebooks to and from different formats. We use this to convert to html and pdf |
kernelspec | This isn't really a module. It's a jupyter command as in jupyter kernelspec . If this doesn't work, we reinstall the jupyter module |
pandas | Pandas is required to view dataframes (or types that can be converter into a dataframe). |
pip | Pip is one of the ways to install packages in Python. It is our most common method for installing |
ensurepip | ensurepip is a way to check for pip if it's not found. We check this module to see if we can use it when pip is missing. If this module isn't available, we run a get-pip script. |
There are number of ways modules can be installed. Almost all of them are similar to pip but depend upon the package manager that the user has.
For local (when the python environment is running on the same machine as the extension host), we do the following based on the environment type:
Environment Type | How an install happens |
---|---|
Default or Unknown
|
Pip: python -m pip install <module>
|
Conda | Conda: conda activate <env name> && conda install <module>
|
VirtualEnv or Venv | <env folder>\scripts\activate && python -m pip install <module> |
PipEnv | pipenv install <module> |
PyEnv | Not really supported. We just use pip : python -m pip install <module> . Should work though because of how pyenv is setup. |
WindowsStore | Same as pip : python -m pip install <module> . |
Poetry | <path to poetry exe> add <module> |
VirtualEnvWrapper | Same as pip : python -m pip install <module> . |
Global | Same as pip : python -m pip install <module> . |
System | Same as pip : python -m pip install <module> . |
For remote, we cannot detect the environment type so we generally just do this:
%pip install <module>
This is an IPython magic that finds the pip needed to install into a running kernel.
We might be able to detect conda at a later date, and use %conda
in that situation.
How is Environment Type determined?
The Python extension does provide the EnvironmentType
for every interpreter, but we also make sure that we can run the associated package manager before we run an install. If we can't, everything defaults back to pip.
Each of the modules we install have a set of versions that we support because they modify behavior of the module.
Jupyter isn't really a module, but a series of submodules. Their are two important to us - notebook and nbconvert
Version | Why | Do we verify |
---|---|---|
5.0 | Oldest we tested. | We don't check version here, but we probably should. |
6.4 | Main release in use. | No |
Version | Why | Do we verify |
---|---|---|
7.0 | Oldest we tested | We don't check version here, but we probably should. |
8.0 | Required for notebook debugging support. | We don't currently upgrade if below this, but instead put up a warning message |
8.4 | With Python 3.10, this is required for full debugging support because of bugs in the implementation. With Python 3.9, version 8.0 will work. | Not checked |
Version | Why | Do we verify |
---|---|---|
0.20 | Required for DataFrame viewing because of ability to generate JSON | We ask the user to install a newer version if not found. Works while debugging too. |
Version | Why | Do we verify |
---|---|---|
6.0.0 | Oldest tested. | Not verified |
Version | Why | Do we verify |
---|---|---|
5.1.1 | There was a known issue with this package. | Verified when a specific error message comes up. See error checking |
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension