tensorflow: [Windows] Cannot import _pywrap_tensorflow when zlib.dll is not in PATH
What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?
#1013 etc…
Environment info
Operating System:
Windows 10 Installed version of CUDA and cuDNN: No CUDA (“CPU support only”)
Pip wheel was self-build. Here’s the output of python -c "import tensorflow; print(tensorflow.__version__)"
: in attatchment
If installed from source, provide git-rev output - 3737ac321e67410bf061257d5f644eae8abbf79b No bazel (is it required?)
If possible, provide a minimal reproducible example (We usually don’t have time to read hundreds of lines of your code)
import tensorflow
What other attempted solutions have you tried?
Install with python setup.py install
and generally avoid any tedious building/making but with no success.
Logs or other output that would be helpful
(If logs are large, please upload as attachment or provide link). output.txt
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (8 by maintainers)
Commits related to this issue
- [Windows/CMake] Remove dependency on zlib.dll. Instead, use the static zlibstatic.lib, as originally intended. Fixes #5275. — committed to mrry/tensorflow by mrry 8 years ago
- [Windows/CMake] Remove dependency on zlib.dll. (#5456) Instead, use the static zlibstatic.lib, as originally intended. Fixes #5275. — committed to tensorflow/tensorflow by mrry 8 years ago
- Update from original Nov 14 (#1) * Expanded docstrings for extract_dask_data and extract_dask_labels. Change: 138123658 * Update generated Python Op docs. Change: 138125802 * Optimize image c... — committed to dfbassi/tensorflow by dfbassi 8 years ago
Hi folks, thanks for digging into this! It looks like we end up depending on both the static and dynamic versions of
zlib
on Windows, for some reason… I’m guessing it’s one of the external project on which we depend, maybe libpng?I’m going to rename the bug and I’ll look into removing this dependency on
zlib.dll
.I ran into this problem too after
pip install
ing the cmake-built.whl
(this is on vanilla Python 3.5 64-bit and built with VS2015). Although dependency walker suggested a bunch of missing dlls, the only one it actually needed waszlib.dll
; after copying that from thebuild
directory into the package installation directory undersite-packages
, the import worked just fine. I realize this is something that @KamodaP already tried unsuccessfully, but I thought it’d be worth chiming in anyway.To that effect, should
zlib.dll
be vendored inside the wheel by cmake, or can it be listed as a dependency?I looked at one of them and it might be part of the msvc crt. Can you run again with a shell that has the MSVC path etc enabled? There should be a batch file somewhere in program files x86 microsoft visual studio* binn or something like that.
Alternatively, try installing https://www.microsoft.com/en-us/download/details.aspx?id=48145 on your system.
Oh, I see. Well, you have to debug why it’s not loading. There are usually two reasons for that, and python would typically give the same error message:
We now have windows GPU support with cmake. It should work with cuda 6.5.