Skip to content

Instantly share code, notes, and snippets.

@hamid-rostami
Created September 8, 2023 09:59
Show Gist options
  • Save hamid-rostami/b8837ce13cd57d7f3c7f5cc668faa241 to your computer and use it in GitHub Desktop.
Save hamid-rostami/b8837ce13cd57d7f3c7f5cc668faa241 to your computer and use it in GitHub Desktop.
Virtualenv for Jupyterlab
  • First create a virtualenv: python -m venv --system-site-packages myenv

  • Install ipykernel: pip install --user ipykernel

  • Create a jupyter kernel: python -m ipykernel install --user --name=myenv

  • Open jupyter-lab and select the new kernel

  • To list existing kernels: jupyter kernelspec list

  • To delete a kernel: jupyter kernelspec uninstall myenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment