-
I am new to observable notebooks in general and have a few questions about the right way to configure a project. I got started by installing notebook-kit with:
Now, I see in the dataloaders documentation, mention of python environments? My current 2.0 notebook cell does not have python as an option. Do I need to setup a python virtual environment for my notebook projects? A bit confused. I am on the latest version 1..3.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Database connectors (SQL cells) and data loaders (Node.js and Python cells) are both optional features. Note that while Observable Notebook Kit 1.3.0 with support for data loaders has been released, Observable Desktop 1.3.0 has not been released yet — that will likely happen later today or tomorrow. (And you’ll either need to download it, or restart Desktop a couple times to get the automatic update.) If you’re using database connectors with Observable Notebook Kit, you must install database drivers (as you said you have done). You do not need to install database drivers if you are using Observable Desktop (our macOS desktop application), as they come installed. If you want to use data loaders, you must install the corresponding interpreter (Node.js or Python). These interpreters do not come bundled with Observable Notebook Kit or Observable Desktop. I recommend using Homebrew on macOS, but there are also official installers for Node.js and Python. If you are using Python data loaders, you can use a virtual environment if you want, but it is not required. To create a Python virtual environment, you can first python3 -m venv .venv
source .venv/bin/activate
pip install numpy pandas
pip freeze > requirements.txt If you do this, Observable Desktop and Observable Notebook Kit will automatically use your virtual environment. If you don’t setup a virtual environment, then your global Python installation will be used instead. |
Beta Was this translation helpful? Give feedback.
Database connectors (SQL cells) and data loaders (Node.js and Python cells) are both optional features. Note that while Observable Notebook Kit 1.3.0 with support for data loaders has been released, Observable Desktop 1.3.0 has not been released yet — that will likely happen later today or tomorrow. (And you’ll either need to download it, or restart Desktop a couple times to get the automatic update.)
If you’re using database connectors with Observable Notebook Kit, you must install database drivers (as you said you have done). You do not need to install database drivers if you are using Observable Desktop (our macOS desktop application), as they come installed.
If you want to use data lo…