1

I tried to update bokeh to 1.4.0 with the command conda update bokeh but encountered the problem of [WinError 126] The specified module could not be found as shown below

(base) D:\Users\jng>conda update bokeh
Collecting package metadata (repodata.json): done
Solving environment: \
Warning: >10 possible package resolutions (only showing differing packages):
  - anaconda/noarch::keras-applications-1.0.8-py_0, anaconda/noarch::keras-preprocessing-1.1.0-py_1, defaults/win-64::h5py-2.8.0-py36hf7173ca_2, defaults/win-64::keras-base-2.2.4-py36_0
  - anaconda/noarch::keras-preprocessing-1.1.0-py_1, defaults/noarch::keras-applications-1.0.8-py_0, defaults/win-64::h5py-2.8.0-py36hf7173ca_2, defaults/win-64::keras-base-2.2.4-py36_0
  - anaconda/noarch::keras-applications-1.0.8-py_0, defaults/noarch::keras-preprocessing-1.1.0-py_1, defaults/win-64::h5py-2.8.0-py36hf7173ca_2, defaults/win-64::keras-base-2.2.4-py36_0
  - defaults/noarch::keras-applications-1.0.8-py_0, defaults/noarch::keras-preprocessing-1.1.0-py_1, defaults/win-64::h5py-2.8.0-py36hf7173ca_2, defaults/win-64::keras-base-2.2.4-py36_0
  - anaconda/noarch::keras-applications-1.0.8-py_0, anaconda/win-64::keras-base-2.2.4-py36_0, defaults/noarch::keras-preprocessing-1.1.0-py_1, defaults/win-64::h5py-2.8.0-py36hf7173ca_2
  - anaconda/win-64::keras-base-2.2.4-py36_0, defaults/noarch::keras-applications-1.0.8-py_0, defaults/noarch::keras-preprocessing-1.1.0-py_1, defaults/win-64::h5py-2.8.0-py36hf7173ca_2
  - anaconda/noarch::keras-applications-1.0.8-py_0, anaconda/noarch::keras-preprocessing-1.1.0-py_1, anaconda/win-64::keras-base-2.2.4-py36_0, defaults/win-64::h5py-2.8.0-py36hf7173ca_2
  - anaconda/noarch::keras-preprocessing-1.1.0-py_1, anaconda/win-64::keras-base-2.2.4-py36_0, defaults/noarch::keras-applications-1.0.8-py_0, defaults/win-64::h5py-2.8.0-py36hf7173ca_2
  - anaconda/noarch::keras-applications-1.0.8-py_0, anaconda/noarch::keras-preprocessing-1.1.0-py_1, anaconda/win-64::h5py-2.8.0-py36hf7173ca_2, anaconda/win-64::keras-base-2.2.4-py36_0
  - anaconda/noarch::keras-applications-1.0.8-py_0, anaconda/win-64::h5py-2.8.0-py36hf7173ca_2, anaconda/win-64::keras-base-2.2.4-py36_0, defaults/noarch::keras-preprocessing-1.1.0-py_1
  ... and othedone

## Package Plan ##

  environment location: D:\Users\jng\AppData\Local\Continuum\anaconda3

  added / updated specs:
    - bokeh


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    h5py-2.8.0                 |   py36hf7173ca_2         822 KB
    keras-base-2.2.4           |           py36_0         458 KB
    ------------------------------------------------------------
                                           Total:         1.3 MB

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

  h5py                                             anaconda --> pkgs/main
  keras-base                                       anaconda --> pkgs/main


Proceed ([y]/n)? y


Downloading and Extracting Packages
keras-base-2.2.4     | 458 KB    |                  |   0%
h5py-2.8.0           | 822 KB    |                  |   0%

[WinError 126] The specified module could not be found
[WinError 126] The specified module could not be found

This is so bewildering because I wanted to update bokeh but why conda wanted to download unrelated packages keras-base-2.2.4 and h5py.-2.8.0 (which had already been installed in my conda base)? Also, what did the message [WinError 126] The specified module could not be found mean? Could someone please help me to resolve the issue? Thanks

Nemo
  • 1,124
  • 2
  • 16
  • 39
  • Don't use the base environment, you should create a new, separate one for each project. I'm actually curious to see if it is (partly?) responsible for the current issue. – AMC Mar 10 '20 at 22:44
  • Thanks, @AMC. I will be doing that from now on. It's just that I thought using `conda` (instead of `pip`) would take care of dependencies which include correct/relevant versions of packages to be installed/updated within an environment. – Nemo Mar 10 '20 at 23:05
  • _It's just that I thought using conda (instead of pip) would take care of dependencies which include correct/relevant versions of packages to be installed/updated within an environment._ What do you mean? – AMC Mar 10 '20 at 23:06
  • I meant if `conda` knew how to handle an environment logically, it would never allow any new installation/update that would break things that previously worked. – Nemo Mar 10 '20 at 23:16
  • How is that related to the current issue, though? – AMC Mar 11 '20 at 00:34
  • I forgot to add that while that is a great goal to have, it sounds like it would be extremely tough to actually implement, depending on how you define _break[ink] things that previously worked._ – AMC Mar 11 '20 at 17:53
  • I just took another look at the output you shared, have you recently changed the channels you’re using or their priorities? – AMC Mar 11 '20 at 17:57
  • I had this issue not with bokeh, but after force-closing a running tensorflow installation (and after fixing the first HTTP error by copying libcrypto-1_1-x64.dll and libssl-1_1-x64.dll). The then upcoming second error led to the same output as yours. – questionto42 Aug 11 '20 at 09:02

1 Answers1

1

This is an issues with conda:

https://github.com/conda/conda/issues/9313

bigreddot
  • 33,642
  • 5
  • 69
  • 122
  • Thanks, @bigreddot. The issue mentioned in your link referred to importing packages. I solved the problem by uninstall then re-install anaconda. Such a hassle with `python` where things are prone to break (compared to `R`). – Nemo Mar 10 '20 at 23:21
  • @Nemo's comment probably mistakenly convinced me to reinstall. Now that I have read through the link of the answer, I must find that it is exactly what is needed: "It's a library load issue. More details at https://github.com/conda/conda/issues/8836 You probably have a broken conda right now. You can use a standalone conda from https://repo.anaconda.com/pkgs/misc/conda-execs/ 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." – questionto42 Aug 11 '20 at 08:24
  • This problem has cost me a whole working day, and the mentioned solution seems plausible but has not reached me after reading many threads. Anyone who may check this and finds it as a working solution, please comment to make this the accepted answer. – questionto42 Aug 11 '20 at 08:31
  • I have mentioned this promising answer at https://stackoverflow.com/questions/1940578/windowserror-error-126-the-specified-module-could-not-be-found/63354661#63354661. – questionto42 Aug 11 '20 at 14:41