fastquant icon indicating copy to clipboard operation
fastquant copied to clipboard

Automatically install Fastquant on-demand on notebooks

Open miohtama opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

A lot of notebooks have commented out pip install line at the start.

Describe the solution you'd like

You can automatically install fastquant on demand like the example below - this considers both installed and fresh notebook servers. It is especially handly for Colab that keeps nuking out your installation between sessions:

try:
    import fastquant
except ImportError:
    # fastquant was not installed, install on demand
    !pip install fastquant
    # Reloads installed Python packages from the desk
    import site
    site.main()  

The user does not need to restart the notebook.

Additional context

Happy to make a PR to update lesson notebooks for this model if this sounds reasonble.

miohtama avatar Jul 23 '21 10:07 miohtama

Hey! Good idea, would be a great addition if anyone wants to pick this up

mikeejazmines avatar Dec 02 '21 06:12 mikeejazmines