Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to install on Windows 7 x64 ? #179

Open
Quantification opened this issue Mar 28, 2018 · 5 comments
Open

Is it possible to install on Windows 7 x64 ? #179

Quantification opened this issue Mar 28, 2018 · 5 comments

Comments

@Quantification
Copy link

Is it worth trying to install haskell-tensorflow on Windows 7 x64 ?
Tried stack install tensorflow, it requires some dependencies.

@fkm3
Copy link
Contributor

fkm3 commented Mar 28, 2018

I've haven't tried it, but if you managed to install tensorflow for windows already, then you probably have most of the dependencies.

I think the main extra dependency we have over tensorflow is libsnappy-dev. That is only needed for tensorflow-records, so, unless you need that package, you can probably save some work by commenting out the tensorflow-records* and snappy-* lines in https:/tensorflow/haskell/blob/master/stack.yaml

(if you do need tensorflow-records, we can probably drop its dependency on snappy without much effort: https:/tensorflow/haskell/blob/master/tensorflow-records/tensorflow-records.cabal#L22)

@EvgenyVorobyov
Copy link

@Quantification , I've successfully installed it on Windows 10 x64. I don't know why it should be different on Windows 7 x64.

I used stack and LTS-11.20.
Steps:

  1. Download Tensorflow C API for Windows X64. I used version 1.9.
  2. Generate import library (tensorflow.lib). I used dumpbin and lib tools from VS2017.
  3. Add location of tensorflow.dll to PATH variable. It's important. And add location of .lib to extra-lib-dirs in your stack.yaml.
  4. Download protoc.exe and add its location to PATH variable.
  5. Try stack install tensorflow. If build fails on c2hs, check generated types. My problem was that c2hs generates CULLong for size_t when tensorflows's sources require CULong.
  6. Install snappy via pacman of stack's MSYS2 (%USERNAME%\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531)
  7. Build your project with tensorflow.

@fkm3
Copy link
Contributor

fkm3 commented Aug 10, 2018

Thanks @EvgenyVorobyov!

Try stack install tensorflow. If build fails on c2hs, check generated types. My problem was that c2hs generates CULLong for size_t when tensorflows's sources require CULong.

That looks like a bug. We should switch a couple CULongs to CSizes.

@EvgenyVorobyov
Copy link

EvgenyVorobyov commented Aug 10, 2018

@fkm3 , I believe its a bug. Probably its Windows only.
If its a bug of c2hs, then maybe its better to make an alias like type CSizeT = {#type size_t #} since c2hs generated CULLong instead of CSize or CULong.

@mst2018
Copy link

mst2018 commented Nov 20, 2018

This look like a very useful package and having it running it on W10x64 would be really great. Would it be possible to make this W10x64 installation totally trivial? If not please could you give step by step details/pointers -- for example on step 2 using VS2017 to generate the import library etc.? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants