Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python vs python3 command for data loaders #1927

Open
dkrasne opened this issue Feb 17, 2025 · 0 comments
Open

python vs python3 command for data loaders #1927

dkrasne opened this issue Feb 17, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dkrasne
Copy link

dkrasne commented Feb 17, 2025

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"]
  },
@dkrasne dkrasne added the enhancement New feature or request label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant