我在 Windows 10 上使用 conda 4.8.5,我有 Python 3.8.5。我的目标是根据该页面上精心布置的步骤从github成功安装 htm.core 。在更新 anaconda 和 python 数小时后,我希望这个安装能够顺利进行。实际结果是我卡在了python setup.py install
.
我收到一个错误,我没有看到其他人在 github 和 stackoverflow 的帖子中挣扎(在下面)。我很困惑,因为我没有使用 Visual Studio,但是 setup.py 引用的 cpp 文件似乎存在某种问题。我查看了错误中的 tolower 函数,它确实需要 2 个参数。但是,我无权访问 LibrarySource.vcxproj 文件来检查它的调用位置。另外,如果它们是构建文件的幕后文件,我不确定为什么我需要访问这些文件中的任何一个。此外,我什至不确定这是否是真正的问题。但是,我无法理解子进程错误(我为此安装更新了 cmake)。预先感谢您的帮助。
DateEncoder.cpp
c:\users\l\htm.core\src\htm\encoders\dateencoder.cpp(121): error C2672: 'std::tolower': no matching overloaded function found [C:\Users\l\htm.core\build\scripts\src\LibrarySource.vcxproj]
c:\users\l\htm.core\src\htm\encoders\dateencoder.cpp(121): error C2780: '_Elem std::tolower(_Elem,const std::locale &)': expects 2 arguments - 1 provided [C:\Users\l\htm.core\build\scripts\src\LibrarySource.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\locale(274): note: see declaration of 'std::tolower'
Traceback (most recent call last):
File "setup.py", line 374, in
getExtensionFiles(platform, build_type)
File "setup.py", line 239, in getExtensionFiles
generateExtensions(platform, build_type)
File "setup.py", line 288, in generateExtensions
subprocess.check_call(["cmake", "--build", ".", "--target", "install", "--config", build_type])
File "C:\Users\l\anaconda3\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release']' returned non-zero exit status 1.
htm.core 文件夹存储在C:\Users\l
,我的 Anaconda 存储在C:\Users\l\anaconda3
.