2017-09-09 1 views
0

EDIT: Apparemment, je dois installer Visual Studio 2015 ... Puis-je installer dlib sans VS 2015? J'ai déjà des versions plus anciennes pré-installées avec Windows. J'utilise Python 3.5, en essayant d'installer dlib sur PyCharm dans le terminal et c'est ce que je reçois, et chaque recherche sur ces erreurs que je fais ... Je trouve des trucs sur Visual Studio que je n'ai pas l'interface graphique + Je n'ai pas vcvarsall.bat dans le dossier VC de l'une des versions de Visual Studio (8, 11, 12, 14). J'ai cherché une bonne quantité avant de poster cette question sur le Web. Ai-je besoin de télécharger la dernière version de Visual Studio pour obtenir vcvarsall.bat?Erreur lors de l'installation de dlib sur Python 3.5 sous Windows 10

Ceci est CMakeLists.txt:

cmake_minimum_required(VERSION ${CMAKE_VERSION}) 
project(IntelFortranImplicit Fortran) 
add_custom_command(
    OUTPUT output.cmake 
    COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake 
) 
add_library(FortranLib hello.f output.cmake) 

C'est l'erreur quand je fais: pip installer Dlib

Collecting dlib 
     Using cached dlib-19.6.1.tar.gz 
    Building wheels for collected packages: dlib 
     Running setup.py bdist_wheel for dlib ... error 
     Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppDat 
    a\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code 
    , __file__, 'exec'))" bdist_wheel -d C:\Users\tiger\AppData\Local\Temp\tmprc21rnv_pip-wheel- --python-tag cp35: 
     running bdist_wheel 
     running build 
     error: Cannot find cmake, ensure it is installed and in the path. 
     You can install cmake using the instructions at https://cmake.org/install/ 
     You can also specify its path with --cmake parameter. 

     ---------------------------------------- 
     Failed building wheel for dlib 
     Running setup.py clean for dlib 
    Failed to build dlib 
    Installing collected packages: dlib 
     Running setup.py install for dlib ... error 
     Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppD 
    ata\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co 
    de, __file__, 'exec'))" install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile 
    : 
     running install 
     running build 
     error: Cannot find cmake, ensure it is installed and in the path. 
     You can install cmake using the instructions at https://cmake.org/install/ 
     You can also specify its path with --cmake parameter. 

     ---------------------------------------- 
    Command "C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppData\\Local\\Temp\\pip-bu 
    ild-gjtgkl6a\\dlib\\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\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile" failed with error code 
    1 in C:\Users\tiger\AppData\Local\Temp\pip-build-gjtgkl6a\dlib\ 
+0

Utilisez-vous Anaconda? Si c'est le cas, vous devez installer 'dlib' avec le gestionnaire de paquets' conda'. Sinon, oui, vous avez besoin de Visual Studio 2015 (ou du moins de ses outils de construction C++). – birryree

+0

J'utilise 'PyCharm' mais j'ai' Anaconda environnement variable', 'conda' gestionnaire de paquets? Je vais devoir trouver ça ... s'il vous plait commenter si vous savez comment ouvrir 'conda package manager' –

Répondre

0

Solution trouvée ici:Using Anaconda installing manager..! exécutant la commande suivante dans PyCharm Terminal: conda install -c conda-forge dlib=19.4 J'étais capable d'utiliser dlib! :)

Un grand merci à Birryree dans les commentaires pour me le faire savoir!