-
Notifications
You must be signed in to change notification settings - Fork 295
Installing Python packages in Jupyter Notebooks
When installing packages using pip, the recommended approach is to use python -m pip install
instead of pip install
. Refer the Installing Python Modules documentation.
Any command prefixed with !
is treated as a shell command in Jupyter cells. Thus !pip install <module>
is treated as a simple shell command that translates to pip install <module>
. However the recommendation is to use python -m pip install <module>
. To get this desired behavior one must use %pip install <module>
However when installing packages in Jupyter into a conda environment, use of conda install
is preferred over pip install
. Hence its highly recommended that one use %conda install
in jupyter notebooks when dealing with Conda enviornments.
See here for further details https://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/
- 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