Python说是216位


1

我在使用Python 2.7.15(x64)在Windows 10(x64)中安装dlib时遇到问题。

我收到一个错误:

Python配置失败:Python是216位,选择的编译器是64位

我不知道Python说它是216位的原因。

Collecting dlib
  Using cached  https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz  安装收集的软件包:dlib
  为dlib运行setup.py安装:已启动
    运行dlib的setup.py安装:状态为“error”
    命令c:\ python27 \ python.exe -u -c“import setuptools,tokenize;  文件  ='c:\ users \ CARLOS \ appdata \ local \ temp \ pip-install-ttcjss \ dlib \ setup.py'; f = getattr(tokenize,'open',open)(  文件  ); code = f.read()。replace('\ r \ n','\ n'); f.close(); exec(编译(代码,  文件 ,'exec'))“install --record c:\ users \ CARLOS \ appdata \ local \ temp \ pip-record-qwail8 \ install-record.txt --single-version-external-managed --compile:
    运行安装
    运行构建
    运行build_py
    包init文件'dlib__init__.py'找不到(或不是常规文件)
    运行build_ext
    构建Python 2.7.15的扩展(v2.7.15:ca079a3ea3,2018年4月30日,16:30:26)[MSC v.1500 64 bit(AMD64)]
    调用CMake设置:'cmake c:\ users \ CARLOS \ appdata \ local \ temp \ pip-install-ttcjss \ dlib \ tools \ python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY = c:\ users \ CARLOS \ appdata \ local \ temp \ pip-install- ttcjss \ dlib \ build \ lib.win-amd64-2.7 -DPYTHON_EXECUTABLE = c:\ python27 \ python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE = c:\ users \ CARLOS \ appdata \ local \ temp \ pip-install-ttcjss \ dlib \ build \ lib.win-amd64-2.7 -A x64'
     - 构建于:Visual Studio 15 2017
     - 选择Windows SDK版本10.0.17763.0以定位Windows 10.0.17134。
     -  C编译器标识是MSVC 19.16.27025.1
     -  CXX编译器标识为MSVC 19.16.27025.1
     - 检查工作C编译器:C:/ Program Files(x86)/ Microsoft Visual Studio / 2017 / BuildTools / VC / Tools / MSVC / 14.16.27023 / bin / Hostx86 / x64 / cl.exe
     - 检查工作C编译器:C:/ Program Files(x86)/ Microsoft Visual Studio / 2017 / BuildTools / VC / Tools / MSVC / 14.16.27023 / bin / Hostx86 / x64 / cl.exe  - 工作原理
     - 检测C编译器ABI信息
     - 检测C编译器ABI信息 - 完成
     - 检测C编译功能
     - 检测C编译功能 - 完成
     - 检查CXX编译器是否正常工作:C:/ Program Files(x86)/ Microsoft Visual Studio / 2017 / BuildTools / VC / Tools / MSVC / 14.16.27023 / bin / Hostx86 / x64 / cl.exe
     - 检查工作CXX编译器:C:/ Program Files(x86)/ Microsoft Visual Studio / 2017 / BuildTools / VC / Tools / MSVC / 14.16.27023 / bin / Hostx86 / x64 / cl.exe  - 工作原理
     - 检测CXX编译器ABI信息
     - 检测CXX编译器ABI信息 - 完成
     - 检测CXX编译功能
     - 检测CXX编译功能 - 完成
     - 找到PythonInterp:C:/Python27/python.exe(找到版本“2.7.15”)
    C语言中的CMake错误:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:122(消息):
      Python配置失败:Python是216位,选择的编译器是64位
    呼叫堆栈(最近一次呼叫):
      C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16(find_package)
      C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/dlib/external/pybind11/CMakeLists.txt:33(include) -- Configuring incomplete, errors occurred!
See also "C:/Users/CARLOS/AppData/Local/Temp/pip-install-ttcjss/dlib/build/temp.win-amd64-2.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 257, in <module>
    'Topic :: Software Development',
  File "c:\Python27\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "c:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 133, in run
    self.build_extension(ext)
  File "c:\users\CARLOS\appdata\local\temp\pip-install-ttcjss\dlib\setup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "c:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\build\\lib.win-amd64-2.7', '-DPYTHON_EXECUTABLE=c:\\python27\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\\users\\CARLOS\\appdata\\local\\temp\\pip-install-ttcjss\\dlib\\build\\lib.win-amd64-2.7', '-A', 'x64']' returned non-zero exit status 1


您应该提供Python配置文件。 (FindPythonLibsNew.cmake第122行)
Ramhound

配置文件在哪里?
Nakar81
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.