Can you upgrade python to latest version

Hiya @tomchristie, welcome to the Glitch forum and thanks for the additional context!

Vote for 3.7, as the minimal python version :wink:

2 Likes

I think this has happened! I just launched a new Glitch project and it appears to have Python 3.7.5!

1 Like

Yeah! We only updated it earlier this week and have been monitoring how it’s going before widely saying anything - do let us know if you encounter any unexpected issues!

1 Like

I’m getting an error right now when running “pip3 install datasette --user” - which worked before.

Looks like the problem is the httptools dependency which is trying to compile a C dependency, but failing because the Python.h header file (usually installed using “apt-get install python3-dev”) isn’t available.

I’ve passed this onto the infrastructure folks and they’re currently deploying a change that installs python3-dev

That fixed the issue! “pip3 install datasette --user” now succeeds in installing all the dependencies!

I’m running into a different problem however: is there any reason the new environment might use up more disk space? I’m getting “184MB / 194MB” for a pretty new project after installing those things, followed by errors that are caused by running out of space.

Could you install to /tmp, compile the binaries, then copy the binaries back to the project for use after the project restarts? (I haven’t tried this myself)

Hey @simonw would you be willing to share a project name? When I spin up a new static site project and then use pip3 install datasette --user it takes up about 23Mb as far as I can tell. However it is possible something changed here that I’d like to investigate.

I think the problem is also attempting to install csvs-to-sqlite since that depends on Pandas. Try remixing this project: https://glitch.com/~datasette-csvs

I think I can drop the Pandas dependency - I will try that this afternoon.

OK, I got it working! https://glitch.com/edit/#!/datasette-csvs is now using my sqlite-utils CLI tool (instead of csvs-to-sqlite) which has much lighter dependencies and doesn’t use up all available disk space.

For the record, here’s the old broken version which no longer works: https://glitch.com/~datasette-csvs-previous