Tensorflow CPU only

Tensorflow 1.3.1 for Python 2.7 64bit on Windows

It is well-known that Tensorflow does not support Python 2.7 on Windows for good reasons. However, for me, the story goes little different and probably unusual. I have about half a dozen of software and services that run on Python on my desktop. Most of them are compatible only with the Python 2.7 version and they usually come with their own local installations of python. Clearly, it becomes a waste of space to have multi Python installation for no reason and it actually conflicts with the environment variables and paths. What I do is remove all the additional copies keeping only one and make hard links to only that one single installation.

However, Tensorflow does not support Python 2.7. In fact, the Tensorflow will not compile with older versions of Visual Studio that are fully ABI compatible with the widely used and commonly available pre-built versions of the core Python 2.7 and the library packages compatible with it. So, again rather than having multiple Python versions, I was, to some extent, forced to build Tensorflow for Python 2.7 64bit with Visual Studio 2015 on Windows.

For the build, I have used the Cmake route which seems to be not very robust, at least at the time of my build. And, I have to encounter numerous build errors and manually fix them. However, I finally have manage to successfully build a wheel package.

The build specifications are as follows:

  • Tensorflow 1.3.1 (CPU only)
  • Python 2.7.13 64bit
  • Visual Studio 2015 (MSC v.1500 64 bit)

I have tested some example codes and found to be running as expected. I however strongly believe that thorough tests are necessary to claim whether this build is 100% okay or not.

I have found in different forums that many users had struggled to build for Python 2.7 64bit in Windows and even if built, ended up with import errors, missing files, etc. I don’t know whether they had finally succeeded or not. So, for those who are really desperate to have one, I have shared the wheel package below.

 

Please beware of the fact that there is a high possibility of ABI mismatch, if used.

Disclaimer: The above shared wheel package is for illustrative purposes only which, I hope, will provide some useful information regarding the build process. It is supplied “AS IS” without any warranties and support. I assume no responsibility or liability for its use of any kind.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2016-2020 Electronics and Software Blog All rights reserved.