Can't compile Python hello world on Windows 10

I was excited to see the Python hello world template now available in the template gallery (GitHub - cloudflare/python-worker-hello-world: Python hello world for Cloudflare Workers) , however I had issues compiling it.

I followed the instructions, created the virtual environment, activated it, installed transcrypt, but ran into a few issues when running wrangler publish

I’ve detailed the issues in the Github repo:

I managed to work around issue 1 with a dirty hack, but issue 2 I have no idea what to do

I don’t think it’s particularly ready for use yet, especially since the feature hasn’t been generally announced yet (only referenced):

This week we’ll be announcing support for Python, Scala, and Kotlin. We want to make sure you don’t have to learn a new language and a new platform to get the benefits of Cloudflare Workers. (I’m still pushing for Perl support.)

I assumed it would be ready if it was in the template gallery

Seems like they have officially announced this now

I agree there are issues with path handling for python, virtualenv, and webpack transcrypt-loader on windows 10. This is not an issue specific to wrangler (all wrangler is doing in this case is calling webpack). I’ll look for workarounds. In the meantime have you tried using Windows Subsystem for Linux?

2 Likes

Workaround added to the readme and the issue linked in the original post