"[WinError 126] The specified module could not be found". Can I fix Anaconda without a full reinstall? [closed]

When installing tensorflow with conda install -c conda-forge tensorflow I get:

## Package Plan ##

environment location: C:\Users\Admin\anaconda3

added / updated specs: - tensorflow

The following packages will be downloaded:

package | build
---------------------------|-----------------
_anaconda_depends-2020.07 | py37_0 6 KB
anaconda-custom | py37_1 3 KB
archspec-0.1.1 | pyh9f0ad1d_0 25 KB conda-forge
ca-certificates-2020.6.20 | hecda079_0 184 KB conda-forge
conda-4.8.4 | py37hc8dfbb8_1 3.1 MB conda-forge
openssl-1.1.1g | he774522_1 5.7 MB conda-forge
------------------------------------------------------------ Total: 9.0 MB

The following NEW packages will be INSTALLED:

_anaconda_depends pkgs/main/win-64::_anaconda_depends-2020.07-py37_0 absl-py
conda-forge/win-64::absl-py-0.9.0-py37hc8dfbb8_1 archspec
conda-forge/noarch::archspec-0.1.1-pyh9f0ad1d_0 astor
conda-forge/noarch::astor-0.8.1-pyh9f0ad1d_0 conda
conda-forge/win-64::conda-4.8.4-py37hc8dfbb8_1 gast
conda-forge/noarch::gast-0.4.0-pyh9f0ad1d_0 google-pasta
conda-forge/noarch::google-pasta-0.2.0-pyh8c360ce_0 grpcio
conda-forge/win-64::grpcio-1.31.0-py37h554427f_0 keras-applications conda-forge/noarch::keras-applications-1.0.8-py_1 keras-preprocessi~ conda-forge/noarch::keras-preprocessing-1.1.0-py_0 libprotobuf
conda-forge/win-64::libprotobuf-3.12.4-h200bbdf_0 markdown
conda-forge/noarch::markdown-3.2.2-py_0 openssl
conda-forge/win-64::openssl-1.1.1g-he774522_1 protobuf
conda-forge/win-64::protobuf-3.12.4-py37h1834ac0_0 python_abi
conda-forge/win-64::python_abi-3.7-1_cp37m tensorboard
conda-forge/win-64::tensorboard-1.14.0-py37_0 tensorflow
conda-forge/win-64::tensorflow-1.14.0-h1f41ff6_0 tensorflow-base
conda-forge/win-64::tensorflow-base-1.14.0-py37hc8dfbb8_0
tensorflow-estima~ conda-forge/win-64::tensorflow-estimator-1.14.0-py37h5ca1d4c_0
termcolor conda-forge/noarch::termcolor-1.1.0-py_2

The following packages will be SUPERSEDED by a higher-priority channel:

ca-certificates pkgs/main::ca-certificates-2020.6.24-0 --> conda-forge::ca-certificates-2020.6.20-hecda079_0

The following packages will be DOWNGRADED:

anaconda 2020.07-py37_0 --> custom-py37_1

Proceed ([y]/n)? y

Downloading and Extracting Packages conda-4.8.4 | 3.1 MB | | 0% _anaconda_depends-20 | 6 KB | | 0% anaconda-custom | 3 KB |
| 0% archspec-0.1.1 | 25 KB |
| 0% openssl-1.1.1g | 5.7 MB |
| 0% ca-certificates-2020 | 184 KB |
| 0%

[WinError 126] The specified module could not be found

[WinError 126] The specified module could not be found

[WinError 126] The specified module could not be found

[WinError 126] The specified module could not be found

[WinError 126] The specified module could not be found

[WinError 126] The specified module could not be found

After this, I tried a few installs, without success:

  • conda install -c conda-forge tensorflow (again)
  • conda update --all
  • conda install anaconda openssl

Every try had again the error

[WinError 126] The specified module could not be found

How can I fix this "WinError 126" without a reinstall of Anaconda?

Context:

Force-closing the tensorflow installation had first caused an HTTP error which was then fixed, see "force-close" during installation causes "CondaHTTPError: HTTP 000 CONNECTION FAILED". This error here appeared after the fix of the HTTP error.

4

1 Answer

Intro:

Tough this answer refers to the already existing answers on Stack Overflow, it might still help someone finding it in the context of the question.

As I did not check any of the solutions but reinstalled Anaconda instead, I cannot confirm that this answer provides the solution, yet I see the "promising solution" as promising enough to post an answer. Whoever has this problem, please comment or answer whether it helped you.

Main:

  1. Promising solution:

The same error can be seen here, for example: with a promising answer, linking to .

There, you find:

It's a library load issue. More details at You probably have a broken conda right now. You can use a standalone conda from to repair it: standalone-conda.exe update -p C:\ProgramData\Anaconda3 conda-package-handling You should get version 1.6.0, and the problems should go away.

Thus, it might simply be a conda issue. Reinstalling standalone conda might repair the error.

  1. Other solutions:

There are highly voted questions of the same error message around, for example .

The answer of "Doo Dah" might provide a solution to the question here, too, it shows you how to check which DLL causes the problem. But even if that was a solution, it is not a comfortable one, I rather do not expect the normal user to become a DLL professional only to solve the error here.

You Might Also Like