-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Being a newbie to Observable Framework, and only having coded for the past couple of years, this problem took me literally hours to solve as I was working my way through the Learn Observable Guide; I wonder if some information could be added to the guide, since it's a pretty big stumbling block for anyone who encounters it.
I use a Windows machine, and when I run Python, I use the command 'python' rather than 'python3'. (When I was learning Python, the instructor told us that this would simply be different on different computers, and it didn't matter which worked so long as one of them did; and that seems overall to be true, although I suspect it could be somewhat more complex than that.)
No matter what I did, and even after I tried creating a virtual environment to run the preview server in, my Python data loaders produced a message in the preview server window that I didn't have Python installed, and I would get a Runtime Error on the page (since they weren't actually creating a file).
After poking through mounds of documentation, I finally found this documentation on changing the configuration defaults, and I saw that it listed python3
as the associated command. I took a gamble on changing that to python
, and it did work, so problem solved for me -- but it seems like a pretty straightforward tip to add to this page of the Learn Observable Guide, for the sake of other neophytes, that if the command they use to run Python is python
, not python3
, they should add this to the end of the chunk in their observablehq.config.js file.
// MODIFY LIST OF INTERPRETERS:
interpreters: {
".py": ["python"]
},