Anaconda Installation: ERROR: The system was unable to find the specified registry key or value

本小妞迷上赌 提交于 2020-04-05 05:38:25

问题


I installed anaconda and setup a new environment from a yml file.

That is fine.

Then i tried to open the prompt window of my new environment and i get the following output every single time.

C:\WINDOWS\system32>SET DISTUTILS_USE_SDK=1

C:\WINDOWS\system32>SET MSSdk=1

C:\WINDOWS\system32>SET platform=

C:\WINDOWS\system32>IF /I [AMD64] == [amd64] set "platform=true"

C:\WINDOWS\system32>IF /I [] == [amd64] set "platform=true"

C:\WINDOWS\system32>if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" ) ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0" )

C:\WINDOWS\system32>for /F "skip=2 tokens=2,*" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B" ERROR: The system was unable to find the specified registry key or value.

C:\WINDOWS\system32>if "" == "" (set "VSINSTALLDIR=" )

C:\WINDOWS\system32>if "" == "" ( ECHO "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work" GOTO End ) "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work" The system cannot find the batch label specified - End

I have no clue how to fix this. Any help ?


回答1:


As suggested by @Arpan removing vs2015_compiler_vars from $CONDAHOME/etc/conda/activate.d helped.




回答2:


My answer is about showing the steps of the proposed solution of @Arpan and that is deleting the batch file named "vs2015_compiler_vars".

How I managed to solve this in Windows

1) Set option to view hidden files

2) Go to this location

C:\ProgramData\Anaconda3\envs\tensorflow_env\etc\conda\activate.d

3) Delete batch file named "vs2015_compiler_vars"

======================================================

How I think to solve this in Linux

Find the file named "vs2015_compiler_vars" and delete it.

As sugested by @Arpan, the file may be found at

$CONDAHOME/etc/conda/activate.d


来源:https://stackoverflow.com/questions/57082951/anaconda-installation-error-the-system-was-unable-to-find-the-specified-regist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!