I am deploying a django project using heroku cloud platform. I have added the dependencies in requirements.txt file. However when I push to heroku master, I get the following error:
Collecting tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17))
remote: Could not find a version that satisfies the requirement tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17)) (from versions: )
remote: No matching distribution found for tensorflow==1.0.0 (from -r /tmp/build_bc8be989466414998410d3ef4c97a115/requirements.txt (line 17))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to what-the-image.
remote:
I am using Django v 1.10 and python 2.7. Where would I be going wrong?
You will be able to install Tensorflow on Heroku by using a wheel .
Simply replace the tensorflow==1.0.0
line in your requirements.txt with https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl
Wheels and eggs are packaging formats for Python code. Wheels are intended to replace the older egg format and generally much more versatile as they don't require a compiler to be available (very useful when deploying to PaaS like Heroku, Microsoft's Azure).
One thing to note about wheels is the naming convention , which reflects the architecture and Python version they are meant to be used on. A quick way to find the type of wheel your system supports is via:
import pip
print(pip.pep425tags.get_supported())
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.