Using anaconda version of python 3.5 for windows , after updating some conda packages the python interpreter stops working giving an error
"The program can't start because VCRUNTIME140.dll is missing from your computer. Try reinstalling the program to fix this problem."
Sometimes this error occurs in some virtual environment, always with python 3.5. Forcing down the python version 3.5 to 3.4 the problem disappears:
C:\> conda install -n myenv python=3.4
NOTE : this bug is registered as: issue #443
The problem originates from updating the windows package
msvc_runtime
, which should be accompanied by the necessary DLLs for its operation.If you look at the list of versions of
msvc_runtime
:We have two versions,
1.0.0
and1.0.1
, with different build tags depending on the version of Visual C++ used. By default, it upgrades to the latest version, the1.0.1
untagged one, which consists of an empty ( transactional ) package, with no associated DLLs. This behavior may be the desired one for a development system where the Visual C++ libraries are installed; but in the case of a normal user, you will need to install these libraries on your own. If care is not taken, itconda
can break the system after upgrading the packagemsvc_runtime
, perhaps as a dependency on another package.It is recommended to force the version of the package
msvc_runtime
( "pinning" ) for which you have to create a file calledpinned
in theconda-meta
conda installation directory that contains the following line:This way we ensure that the version
1.0.1
with the Visual C++-14msvc_runtime
DLLs will be installed . This pinning should not affect the dependent packages since it is the same package, just with the runtime DLLs added.msvc_runtime
(Documentation on pinning in conda )
UPDATE : after studying the problem in the buglog , it was decided to remove the package without DLLs from the repository, so conda now correctly selects the package that corresponds to the python installation.