Несколько ошибок при попытке установить azureml-interpret

В настоящее время я пытаюсь установить azureml-interpret, но у меня проблемы с shap azureml-interpret.

Во время работы pip install azureml-interpret я получил:

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Alex\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-install-k175gbg_\\shap_1e1feac0fd27463fbfcdc6216c3f4c6f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-install-k175gbg_\\shap_1e1feac0fd27463fbfcdc6216c3f4c6f\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alex\AppData\Local\Temp\pip-record-bu1hm3ps\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\shap'
         cwd: C:\Users\Alex\AppData\Local\Temp\pip-install-k175gbg_\shap_1e1feac0fd27463fbfcdc6216c3f4c6f\
    Complete output (64 lines):

    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\shap
    copying shap\common.py -> build\lib.win-amd64-3.9\shap
    copying shap\datasets.py -> build\lib.win-amd64-3.9\shap
    copying shap\__init__.py -> build\lib.win-amd64-3.9\shap
    creating build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\bruteforce.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\explainer.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\gradient.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\kernel.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\linear.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\mimic.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\partition.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\permutation.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\pytree.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\sampling.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\tree.py -> build\lib.win-amd64-3.9\shap\explainers
    copying shap\explainers\__init__.py -> build\lib.win-amd64-3.9\shap\explainers
    creating build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\coefficent.py -> build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\lime.py -> build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\maple.py -> build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\random.py -> build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\treegain.py -> build\lib.win-amd64-3.9\shap\explainers\other
    copying shap\explainers\other\__init__.py -> build\lib.win-amd64-3.9\shap\explainers\other
    creating build\lib.win-amd64-3.9\shap\explainers\deep
    copying shap\explainers\deep\deep_pytorch.py -> build\lib.win-amd64-3.9\shap\explainers\deep
    copying shap\explainers\deep\deep_tf.py -> build\lib.win-amd64-3.9\shap\explainers\deep
    copying shap\explainers\deep\__init__.py -> build\lib.win-amd64-3.9\shap\explainers\deep
    creating build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\bar.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\colorconv.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\colors.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\decision.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\dependence.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\embedding.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\force.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\force_matplotlib.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\image.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\monitoring.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\partial_dependence.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\summary.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\waterfall.py -> build\lib.win-amd64-3.9\shap\plots
    copying shap\plots\__init__.py -> build\lib.win-amd64-3.9\shap\plots
    creating build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\experiments.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\measures.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\methods.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\metrics.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\models.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\plots.py -> build\lib.win-amd64-3.9\shap\benchmark
    copying shap\benchmark\__init__.py -> build\lib.win-amd64-3.9\shap\benchmark
    creating build\lib.win-amd64-3.9\shap\plots\resources
    copying shap\plots\resources\bundle.js -> build\lib.win-amd64-3.9\shap\plots\resources
    copying shap\plots\resources\logoSmallGray.png -> build\lib.win-amd64-3.9\shap\plots\resources
    copying shap\tree_shap.h -> build\lib.win-amd64-3.9\shap
    running build_ext
    numpy.get_include() C:\Users\Alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\numpy\core\include
    building 'shap._cext' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\Alex\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-install-k175gbg_\\shap_1e1feac0fd27463fbfcdc6216c3f4c6f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-install-k175gbg_\\shap_1e1feac0fd27463fbfcdc6216c3f4c6f\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alex\AppData\Local\Temp\pip-record-bu1hm3ps\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\shap' Check the logs for full command output.

Я также пытался сначала использовать conda install -c conda-forge shap для установки shap, а затем попытаться установить azureml-interpret, но у меня все еще есть те же проблемы.


person Alex Georget    schedule 16.02.2021    source источник
comment
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ --› вы устанавливали инструменты сборки C++?   -  person Sabito 錆兎    schedule 16.02.2021
comment
Да, я сделал это, и у меня такая же ошибка   -  person Alex Georget    schedule 16.02.2021
comment
Проголосовали за аналогичную проблему здесь, Запуск setup.py clean для shap, Не удалось собрать shap   -  person Mohsen Sichani    schedule 03.05.2021


Ответы (1)


У меня была такая же проблема, и установка сборки C++ решила проблему.

См. ниже Как установить инструменты сборки Visual C++?

person Mohsen Sichani    schedule 03.05.2021