Skip to content

Instantly share code, notes, and snippets.

@fbender
Last active January 16, 2024 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbender/2bd2d4e0bab796a37226985dd8c449a1 to your computer and use it in GitHub Desktop.
Save fbender/2bd2d4e0bab796a37226985dd8c449a1 to your computer and use it in GitHub Desktop.
Baseline Scientific Python conda enviroment using VSCode for Jupyter
#!/bin/sh -
#
# Install baseline scientific packages including Jupyter kernel (e.g. into 'base' enviroment):
conda install sympy tabulate seaborn scipy ipykernel
# That's it, you don't need to install all of Jupyter into the enviroment if you "connect" from another
# Jupyter instance, e.g. through VS Code with the Jupyter extension, to this enviroment; the 'ipykernel'
# is sufficient. NumPy, matplotlib, pandas, etc. are part of the dependencies of above packages. Install
# panda's recommended dependencies if numeric operations need a speed up, esp. for large data sets; ref.
# https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#install-recommended-dependencies
# Use 'pytables' or 'h5py' for very large data sets. For interactive plots, use 'bokeh'. Other interesting
# packages are e.g. at https://numfocus.org/sponsored-projects/?_sft_project_category=python-interface.
#
# VS Code shall have the following extensions (plus dependencies) installed:
# - Jupyter
# - Pylance/Python
# - Python Environment Manager
# Then configure VS Code to select the Python Interpreter from the desired conda enviroment (e.g. 'base').
# VS Code / Python Environment Manager did not immediately identify the conda enviroment, but eventually
# did after an editor restart. Not sure I did something extra in the configuration, though. Suggestion from
# VS Code / Python was then also to set 'terminal.integrated.inheritEnv' to false, which I did, too; ref.
# https://code.visualstudio.com/updates/v1_36#_launch-terminals-with-clean-environments.
#
#EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment