0

操作系统:Windows-10

我正在尝试在我的 Conda 虚拟环境中安装数据科学包。我之前在这样的 conda 环境中创建和工作过,并且完全没有遇到任何问题,即使在使用 Keras 时也是如此。但是,这一次,我什至无法理解这个问题的原因。

这就是我创建 Conda 虚拟环境的方式:

  1. 打开 Anaconda 提示

  2. cd path_to_my_project_folder

  3. conda create --prefix ./env numpy keras tensorflow jupyter notebook flask

  4. conda activate path_to_my_project_folder/env

在安装软件包期间和之后,我看不到任何错误消息。但是,一旦我激活我的 conda 环境,我就会收到以下错误消息,而且,当我检查已安装的包时,我会看到除 Keras 之外的所有包。一旦我激活我的 conda 虚拟环境,我的 Anaconda Prompt 中就会出现以下错误消息:


(base) C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>conda activate  C:/Users/Neerva/Documents/SU/SEM5/ibm_ice/tomato_leaf_disease_prediction/env

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>python C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction\env\etc\keras\load_config.py  1>temp.txt

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set /p KERAS_BACKEND= 0<temp.txt

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>del temp.txt

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>python -c "import keras"  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 (
ver  1>nul
 set "KERAS_BACKEND=theano"
 python -c "import keras"  1>nul 2>&1
)

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>SET DISTUTILS_USE_SDK=1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>SET MSSdk=1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>SET "VS_VERSION=15.0"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>SET "VS_MAJOR=15"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>SET "VS_YEAR=2017"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "MSYS2_ENV_CONV_EXCL=CL"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "CXX=cl.exe"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "CC=cl.exe"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>set "VSINSTALLDIR="

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -version [15.0,16.0) -property installationPath`) do (set "VSINSTALLDIR=%i\" )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if not exist "" (for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 -property installationPath`) do (set "VSINSTALLDIR=%i\" ) )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if not exist "" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\" )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\" )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\" )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\" )

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>IF NOT "" == "" (
set "INCLUDE=;"
 set "LIB=;"
 set "CMAKE_PREFIX_PATH=;"
)

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>call :GetWin10SdkDir

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 exit /B 1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>exit /B 0

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>for /F %i in ('dir /ON /B "\include\10.*"') DO (SET WindowsSDKVer=%~i )
The system cannot find the file specified.

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 (echo "Didn't find any windows 10 SDK. I'm not sure if things will work, but let's try..." )  else (echo Windows SDK version found as: "" )
Windows SDK version found as: ""

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>IF "win-64" == "win-64" (
set "CMAKE_GEN=Visual Studio 15 2017 Win64"
 set "BITS=64"
)  else (
set "CMAKE_GEN=Visual Studio 15 2017"
 set "BITS=32"
)

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
The system cannot find the path specified.

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>CALL "VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.16
The system cannot find the path specified.

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>popd

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>IF "" == "" SET "CMAKE_GENERATOR=Visual Studio 15 2017 Win64"

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>if errorlevel 1 exit /B 1

C:\Users\Neerva\Documents\SU\SEM5\ibm_ice\tomato_leaf_disease_prediction>exit /B 0

在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

与我自己的问题类似的问题:https ://github.com/keras-team/keras/issues/13209

4

0 回答 0