Python workers cannot deploy correctly when using FastAPI

I have recently written a worker in Python, but I have encountered trouble in the deployment: I used FastAPI in my project following the tutorial, and it worked fine in my local environment, but I encountered a deadlock when I wanted to upload it. When I deployed the project following the example project, wrangler told me that requirements.txt is not currently supported. The original text I got was: "You cannot yet deploy Python Workers that depend on packages defined in requirements.txt. Support for Python packages is coming soon. [code: 10021]" When I remove requirements.txt, it says: ModuleNotFoundError: No module named 'fastapi'. What should I do to properly publish the project? See this issue for more technical details
GitHub
🐛 BUG: Python workers cannot deploy correctly when using FastAPI · ...
Which Cloudflare product(s) does this pertain to? Workers for Platforms What version(s) of the tool(s) are you using? wrangler 3.50.0 What version of Node are you using? 21.7.2 What operating syste...
1 Reply
Want results from more Discord servers?
Add your server