To deploy my Flask application, I have added a runtime.txt file otherwise Netlify defaults to Python 2.7. In the runtime file, I wrote python-3.7.2. When I deploy it on Netlify, the build keeps failing.
This is the error that I get.
3:19:04 PM: Installing dependencies
3:19:04 PM: /usr/local/bin/run-build-functions.sh: line 170: /opt/buildhome/pythonpython-
3.7.2/bin/activate: No such file or directory
3:19:04 PM: Error setting python version from runtime.txt
3:19:04 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
I’ve read the docs, searched online for 3 hours and still no fix. Any advice would be greatly appreciated.
7:33:49 PM: ERROR: Could not find a version that satisfies the requirement pywin32==224 (from -r requirements.txt (line 6)) (from versions: none)
7:33:49 PM: ERROR: No matching distribution found for pywin32==224 (from -r requirements.txt (line 6))
7:33:50 PM: Error installing pip dependencies
7:33:50 PM: Error running command: Build script returned non-zero exit code: 1
I tried to installing pypiwin32, it still doesn’t work
7:39:13 PM: Collecting pywin32>=223 (from pypiwin32->-r requirements.txt (line 6))
7:39:13 PM: ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32->-r requirements.txt (line 6)) (from versions: none)
7:39:13 PM: ERROR: No matching distribution found for pywin32>=223 (from pypiwin32->-r requirements.txt (line 6))
7:39:14 PM: Error installing pip dependencies
I’m not sure we have tk in the build environment, which I assume would be needed to build that extension. Mind including a link to your build logs so we can check them out in-situ to see if they have any more information that would be helpful?
Thanks @SaiG, but can you give an actual link to the deploy log or provide us with the deploy ID from the URL of the deploy log? Also, have you tried changing the build image to Trusty instead of Xenial? That may work better for you.
If you actually plan to use tk, rather than just testing with it, you can file a feature request here: Issues · netlify/build-image · GitHub (or better, a PR adding it: Pull requests · netlify/build-image · GitHub). However, it makes sense that that particular package doesn’t work right now, and you are the first person to ever ask for it, so we’ll probably not get it shipped too soon even if you do request it there, but we’ll put it in the backlog and let you know if we do.
A PR is likely to get applied sooner but still not “in the next week” kind of timeline.