admin管理员组文章数量:1122852
上回重装了一次anaconda每次激活虚拟环境就会有这个报错提示,但是并不影响我的正常激活和运行,因为自己稍微有那么一点点的强迫症,今天解决了
报错大概分为两部分!分两步解决
一:
(base) C:\Users\123>activate tfg
C:\Users\123>python C:\Users\123\Anaconda3\envs\tfg\etc\keras\load_config.py 1>temp.txt
C:\Users\123>set /p KERAS_BACKEND= 0<temp.txt
C:\Users\123>del temp.txt
C:\Users\123>python -c “import keras” 1>nul 2>&1
C:\Users\123>if errorlevel 1 (
ver 1>nul
set “KERAS_BACKEND=theano”
python -c “import keras” 1>nul 2>&1
)
C:\Users\123>SET DISTUTILS_USE_SDK=1
C:\Users\123>SET MSSdk=1
C:\Users\123>SET platform=
C:\Users\123>IF /I [AMD64] == [amd64] set “platform=true”
C:\Users\123>IF /I [] == [amd64] set “platform=true”
解决方法:
打开你安装anaconda的路径,进入自己的对应虚拟环境找到以下文件
我自己的路径是—F:\Anaconda3\envs\tensorflow\etc\conda\activate.d和F:\Anaconda3\envs\tensorflow\etc\conda\deactivate.d
打开里面的.bat文件全部注释便可
二:
C:\Users\123>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:\Users\123>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”
C:\Users\123>SET “VSINSTALLDIR=D:\Professional\VisualStudio\Common7\IDE”
C:\Users\123>if “D:\Professional\VisualStudio\Common7\IDE” == “” (set “VSINSTALLDIR=D:\Professional\VisualStudio\Common7\Tools” )
C:\Users\123>if “D:\Professional\VisualStudio\Common7\IDE” == “” (
ECHO “WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work”
GOTO End
)
C:\Users\123>echo “Found VS2014 at D:\Professional\VisualStudio\Common7\IDE”
“Found VS2014 at D:\Professional\VisualStudio\Common7\IDE”
C:\Users\123>SET “VS_VERSION=14.0”
C:\Users\123>SET “VS_MAJOR=14”
C:\Users\123>SET “VS_YEAR=2015”
C:\Users\123>set “MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out”
C:\Users\123>set “MSYS2_ENV_CONV_EXCL=CL”
C:\Users\123>set “PY_VCRUNTIME_REDIST=\vcruntime140.dll”
C:\Users\123>set “CFLAGS= -MD -GL”
C:\Users\ZouDeXiang>set “CXXFLAGS= -MD -GL”
C:\Users\123>set “LDFLAGS_SHARED= -LTCG ucrt.lib”
C:\Users\123>set “CXX=cl.exe”
C:\Users\123>set “CC=cl.exe”
C:\Users\123>IF /I [] == [win-64] (set “folder=x64” ) else (set “folder=x86” )
C:\Users\123>for /F “tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits*1” /B /O:N’) do for %A in (%~I) do if “%A” == “8.1” set win=%A
C:\Users\123>for %A in (10) do if “%A” == “8.1” set win=%A
C:\Users\123>if “10” == “8.1” set win=10
C:\Users\123>for %A in (8.1) do if “%A” == “8.1” set win=%A
C:\Users\123>if “8.1” == “8.1” set win=8.1
C:\Users\123>for /F “tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits*1” /B /O:N’) do for %A in (%~I) do if “%A” == “10” set win=%A
C:\Users\123>for %A in (10) do if “%A” == “10” set win=%A
C:\Users\123>if “10” == “10” set win=10
C:\Users\123>for %A in (8.1) do if “%A” == “10” set win=%A
C:\Users\123>if “8.1” == “10” set win=8.1
C:\Users\123>setlocal enabledelayedexpansion
C:\Users\123>if “10” == “10” (
for /F “tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits\10\bin\10” /B /O:N’) do for %A in (%~I) do set last=%A
set “sdk_bin_path=C:\Program Files (x86)\Windows Kits\10\bin!last!\x86”
) else (set “sdk_bin_path=C:\Program Files (x86)\Windows Kits\8.1\bin\x86” )
找不到文件
C:\Users\123>endlocal & set “PATH=C:\Users\123\Anaconda3\envs\tfg;C:\Users\ZouDeXiang\Anaconda3\envs\tfg\Library\mingw-w64\bin;C:\Users\123\Anaconda3\envs\tfg\Library\usr\bin;C:\Users\123\Anaconda3\envs\tfg\Library\bin;C:\Users\123\Anaconda3\envs\tfg\Scripts;C:\Users\123\Anaconda3\envs\tfg\bin;C:\Users\123\Anaconda3\condabin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\Professional\matlab2016a\runtime\win64;D:\Professional\matlab2016a\bin;D:\Professional\matlab2016a\polyspace\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.1;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Users\ZouDeXiang\Anaconda3;C:\Users\123\Anaconda3\Library\mingw-w64\bin;C:\Users\123\Anaconda3\Library\usr\bin;C:\Users\ZouDeXiang\Anaconda3\Library\bin;C:\Users\123\Anaconda3\Scripts;C:\Users\123\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Windows Kits\10\bin\x86”
C:\Users\123>IF NOT “” == “” (
set “INCLUDE=;”
set “LIB=;”
set “CMAKE_PREFIX_PATH=;”
)
C:\Users\123>SET “CMAKE_GENERATOR=Visual Studio 14 2015 Win64”
C:\Users\123>CALL “D:\Professional\VisualStudio\Common7\IDE…\VC\vcvarsall.bat” amd64
(tfg) C:\Users\123>
解决方法:
还是刚刚的路径F:\Anaconda3\envs\tensorflow\etc\conda\deactivate.d
删除这个文件就好了
版权声明:本文标题:jupyter notebook新手爬坑记 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1724520335a892341.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论