Problems installing "MATLAB Engine for Python" with Anaconda - python

I am using Python 3.4.3 | Anaconda 2.3.0 (x86_64) on OS X 10.10.5 and following these instructions to install MATLAB Engine for Python. Installation seems to succeed, but upon launching python & attempting to import, I see the following:
Python 3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Oct 20 2015, 14:27:51)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matlab.engine
Traceback (most recent call last):
File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 42, in <module>
pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
File "/Users/tyler/anaconda/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'matlabengineforpython3_4'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 58, in <module>
pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
File "/Users/tyler/anaconda/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
File "<frozen importlib._bootstrap>", line 539, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 1715, in load_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
ImportError: dlopen(/Applications/MATLAB_R2015b.app/extern/engines/python/dist/matlab/engine/maci64/matlabengineforpython3_4.so, 2): Library not loaded: #rpath/libpython3.4m.dylib
Referenced from: /Applications/MATLAB_R2015b .app/extern/engines/python/dist/matlab/engine/maci64/matlabengineforpython3_4.so
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/tyler/.local/lib/python3.4/site-packages/matlab/engine/__init__.py", line 60, in <module>
raise EnvironmentError('The installation of MATLAB Engine for Python is '
OSError: The installation of MATLAB Engine for Python is corrupted. Please reinstall it or contact MathWorks Technical Support for assistance.
While researching this issue, I found several other references to this exact issue on MathWorks' website, all without a resolution. The final link suggests the problem may be with dynamic linking.
Given how many scientific toolboxes are only available in MATLAB, it would be of great use to be able to call this engine using Anaconda. While there are other packages available that support this functionality, they invariably have limitations or other complexity like a client-server architecture.
Any suggestions are most welcome.

According to my communication with MathWorks support, MATLAB Engine for Python is incompatible with Anaconda. Fortunately, this is incorrect.
Thanks to some direction from the Anaconda mailing list, I found a simple solution:
sudo ln -s ~/anaconda/lib/libpython3.4m.dylib /usr/lib
After this, matlab.engine imports successfully. Hope this helps someone!
Edit: As of OS X 10.11 El Capitan, the workaround needs to be tweaked due to the Rootless feature, as root no longer has permission to modify /usr/lib
sudo ln -s ~/anaconda/lib/libpython3.4m.dylib /usr/local/lib

If you're trying to install matlab engine in a conda environment, follow the below steps:
cd "matlabroot\extern\engines\python"
python setup.py install --prefix="installdir"
Eg
cd /opt/MATLAB/R2019a/extern/engines/python
python setup.py install --prefix="/home/nagabhushan/anaconda3/"
Now, matlab engine package is actually installed under the separate
anaconda3/lib/python3.6/site-package/matlab
So you need to manually move that matlab folder to the site-package folder your python is using. If you have multiple virtual envs, move it to the corresponding site-package folder of the virtual env you will run program.
Eg
anaconda3/envs/my_env/lob/python3.6/site-packages/matlab
References:
https://stackoverflow.com/a/41800724/3337089
https://stackoverflow.com/a/56553740/3337089
Edit 1 (03-Mar-2020):
I tried activating my environment and then simply installing matlab engine and it worked! I'm using Python 3.7
python setup.py install
Note that this initially gave error that error: You do not have write permission in build/lib/matlab/engine/, but changing the permission of build directory recursively worked: sudo chmod -R 777 build/

Related

Segfault when importing modules in Python virtual environment (pyenv) from console

[OS info: 5.14.14-arch1-1 x86_64 GNU/Linux]
After creating a Python v3.7.0 virtual-env with Pyenv, with the --no-site-packages option, I install packages with pip, using:
$ python -m -pip install <package-name>
An example is either Pandas v1.1.5 or Torch v1.7.0+cpu installed in the virtual-env. Then, starting a Python 3.7.0 shell in console, simply by issuing python in terminal in that environment, I try to import those packages. The result is:
$ python
Python 3.7.0 (default, Oct 20 2021, 09:16:31)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
+>>> import faulthandler; faulthandler.enable()
+>>> import torch
Fatal Python error: Segmentation fault
Current thread 0x00007fac608f22c0 (most recent call first):
File "/home/USER/.pyenv/versions/3.7.0/lib/python3.7/ctypes/__init__.py", line 273 in _reset_cache
File "/home/USER/.pyenv/versions/3.7.0/lib/python3.7/ctypes/__init__.py", line 543 in <module>
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 728 in exec_module
File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 983 in _find_and_load
File "/home/USER/.pyenv/versions/3.7.0/lib/python3.7/site-packages/torch/__init__.py", line 16 in <module>
File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 728 in exec_module
File "<frozen importlib._bootstrap>", line 677 in _load_unlocked
File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 983 in _find_and_load
File "<stdin>", line 1 in <module>
Segmentation fault
$
The interesting thing is that if in that same virtual-env, I put together an iPython kernel, like so:
$ ipython kernel install --user --name <my_project> --display-name "<Python3.7.0 (my_project)>"
and import the same package(s), say from a Jupyter notebook running that kernel, there is absolutely no issue. This tells me that there is no version issue (although dependency issues could occur still, I suppose. The segmentation fault only occurs in the Python shell in console. Also when I try importing from my pyenv global environment (3.10.0), there seems to be no issue whatsoever.
Any help to understand why and how to resolve the issue is welcome.
This is a tentative answer as I lack of a definite proof of solution. Anyone more comfortable than I am with debugging is welcome to add to it or to write their own answer.
(i) I originally thought something along the line of a corrupted ~/.inputrc might be responsible for the "hoopla" along the lines of this answer on SO. However nothing had changed in that ~/.inputrc file in past months. So the issue was more likely to be a problematic update sequence.
(ii) Looking at lines 273 and 543 in /home/USER/.pyenv/versions/3.7.0/lib/python3.7/ctypes/__init__.py the _reset_cache() function seems to trigger the segfault, just as module ctypes is imported for instance in ../torch/__init__.py.
(iii) updating pyenv to the latest version build (v2.1.0-1) and, a day later, gdbm aka GNU dbm (v1.22-1), the database function library on which Python depends, seems to have solved the issue.(Co-)incidentally both packages are maintained by the same person. ;-)
Still unsure about exactly what was at play here. Consulting the GDBM documentation did not help. Sorry about the incomplete answer.

How can i install gdal for python in windows 10?

I'm trying to install gdal library. i've tried the things recomended here Installing gdal python library on windows using conda (DLL load failed)
and here: https://github.com/felipunky/GISPython/blob/master/README.md
then i tried:
C:\Users\User>pip install D:\Seba\Programas\GDAL-3.3.0-cp37-cp37m-win_amd64.whl
Requirement already satisfied: GDAL==3.3.0 from file:///D:/Seba/Programas/GDAL-3.3.0-cp37-cp37m-win_amd64.whl in c:\users\user\appdata\local\programs\python\python37\lib\site-packages (3.3.0)
WARNING: You are using pip version 20.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'c:\users\user\appdata\local\programs\python\python37\python.exe -m pip install --upgrade pip' command.
C:\Users\User>python
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gdal'
>>> from osgeo import gdal
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\osgeo\__init__.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: No se puede encontrar el módulo especificado.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\osgeo\__init__.py", line 34, in <module>
_gdal = swig_import_helper()
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\osgeo\__init__.py", line 31, in swig_import_helper
return importlib.import_module('_gdal')
File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_gdal'
>>>
any recomendation?
Thanks
conda install of gdal in windows does work.
You haven't given much to go on, but my guess is that you have not activated the conda environment into which gdal has been installed.
Normally your command prompt would look like this, if you had activated it
(gdal_env_name) C:\Users\User>python
Also, run
conda list
to check that all the expected libraries are there.
Try this once: sudo easy_install GDAL

Cannot import bloomberg api

I have installed the bloomberg Python API and set the BLPAPI_ROOT to the VC++ folder.
However, when I import blpapi, I got the following error.
How to get rid of these errors?
Thank you very much.
import blpapi
Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\blpapi\internals.py", line 39, in swig_import_helper
return importlib.import_module(mname)
File "C:\Program Files\WinPython-64bit-3.6.2.0Qt5\python-3.6.2.amd64\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
File "<frozen importlib._bootstrap>", line 560, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\blpapi\__init__.py", line 4, in <module>
from .internals import CorrelationId
File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\blpapi\internals.py", line 42, in <module>
_internals = swig_import_helper()
File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\blpapi\internals.py", line 41, in swig_import_helper
return importlib.import_module('_internals')
File "C:\Program Files\WinPython-64bit-3.6.2.0Qt5\python-3.6.2.amd64\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_internals'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\blpapi\__init__.py", line 9, in <module>
raise debug_load_error(error)
ImportError: No module named '_versionhelper'
Could not open the C++ SDK library.
Download and install the latest C++ SDK from:
http://www.bloomberg.com/professional/api-library
If the C++ SDK is already installed, please ensure that the path to the library
was added to PATH before entering the interpreter.
I did 2 things to solve an issue similar to that:
1- I installed Microsoft Visual Studio with the following components
C++/CLI Support
VC++ 2015.3 v14.00 (v140) toolset for desktop
Visual C++ MFC for x86 and x64
Visual C++ ATL for x86 and x64
2- I manually copied the .dll files in C++API\lib (blpapi3_32.dll and blpapi3_64.dll in my case) into C:\windows\system32 where all the dll files that system uses.
Also, I copied the dll files in in C++API\lib into C:\blp\DAPI, replacing the new ones with the old ones.
Please set BLPAPI_ROOT environment variable to the location where the blpapi C++ SDK is located.
An alternative option is to use conda, as discussed here and here.
If you use conda you don't need to worry about downloading the C++ SDK and properly configuring the BLPAPI_ROOT. From the conda-forge channel this can be done using
conda install -c conda-forge blpapi

import cntk works in VS2017 "python environment" but not in "python project"

I'm trying to use CNTK in Python/VS2017. I'm experienced in VS but new to Python and CNTK.
I've installed CNTK into Anaconda 4.1.1 and I've created a custom Anaconda environment pointing to C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35.
If I open an Interactive Window from the "Python Environments" list in VS2017, I can import CNTK.
However, if I create an empty Python project in VS2017, then open an Interactive Window from the same Anaconda environment shown in the project "Python Environments" list, I get a "module not found".
Any help is appreciated,
Bill
Traceback (most recent call last):
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\cntk\cntk_py.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'cntk._cntk_py'
This seems like a flaw in VS2017 to me, but this is a solution, if not a good one.
In the Python project properties I changed the Working director from "." to the full path of the Anaconda environment.

No Module Named '_pywrap_tensorflow_internal'

While trying to validate the installation of tensorflow-gpu, I get an ImportError when trying to execute "import tensorflow as tf". I am using a Quadro K620 on Windows 7. Tensorflow was installed using pip.
The following is the stack trace:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\aagarwal>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_hel
per
return importlib.import_module(mname)
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\importlib\_
_init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_hel
per
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\importlib\_
_init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_hel
per
return importlib.import_module(mname)
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\importlib\_
_init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\site-packag
es\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_hel
per
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\aagarwal\AppData\Local\Programs\Python\Python35\lib\importlib\_
_init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>
I have looked at multiple other stack overflow posts which things like correcting the path but I have not been able to solve this issue.
I came across the same issue today, please switch to cuDNN v5.1 Library for Windows instead as #mickdelaney suggested and then try to
Check environment settings of CUDA, normally all the settings of CUDA had been added to Windows environment
Copy files in bin, lib and include of cuDNN to bin, lib and include of CUDA respectively. Normally the directory is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
And then you can import tensorflow and run your code. Good luck!
I found the solution for the CPU: It worked for me
Just run below command if necessary then update it
pip install tensorflow==1.5
you could uninstall the current version of tensorflow and try a low version such as TensorFlow 0.12 using the code
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
https://blog.csdn.net/baidu_36669549/article/details/79734590
After you install the CUDA Drivers you must download cuDNN and release it. After that you get to copy the cudnn64_5.dll to PATH.
If that doesn't work, move the cudnn64_5.dll to
NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin and try it again. Otherwise you'd meet some error that you see.
https://github.com/tensorflow/tensorflow/issues/7705
switch to cuDNN 5.1 instead of 6.0
I had the same error with anaconda, it was previously installed with another program through anaconda. Installing again through conda-forge worked: conda install -c conda-forge tensorflow
I still got this error after installing cuDNN 5.1 (yes, I had PATH set correctly). I had better luck installing tensorflow_gpu from this site. This requires cuDNN 6.0, not 5.1. Unfortunately they currently only have Tensorflow 1.1 for GPU systems.
this is all about your video chip/card and CPU compatibility with TF VERSION! Current version of Tensor Flow is 1.8 and it crashes on both my machines.
I have a win7 Gateway notebook using an I5 CPU and intel video chip. I have a desktop win7 unit with AMD Phenom II and AMD Radeon HD5450 video card. The I5 notebook requires V1.6 of TensorFlow and the desktop AMD unit takes V1.5. I don't have a GPU available for running ANN's so I don't know how that would affect it.
Here's the command line for PIP install: pip install --upgrade tensorflow==1.5.0 (or whatever other version you need). This will uninstall your current version and then install the indicated version.
Build or copy a small TensorFlow script and run it in a command window. Open a second command window and install a different version. I'd recommend starting at 1.5 and working your way up.
The only thing that worked for me (Windows 10) is:
Install Microsoft Visual C++ 2015 Redistributable Update 3
If you have a new fresh computer setup this one might miss.
I am a chinese, so my english is poor, and my answer is that however you use cudnn 7 or 6 or 5 , you must rename the dll from cudnn64_x.dll to cudnn64_6.dll after you copy files.
maybe soon, you need to rename the dll to 7 or 8 or 9 as possible.
It worked for me after doing this command :
pip install tensorflow-gpu == 1.15.5
I was previously with tensorflow-gpu 1.15.0 when it was showing the error

Categories