【发布时间】:2017-03-24 18:37:15
【问题描述】:
我已经尝试了几天来实现这一目标。所以请接受任何建议。我试图在我的 Windows 上安装 lightfm,但我一直在报这个错误
Collecting lightfm
Using cached lightfm-1.12.tar.gz
Requirement already satisfied: numpy in c:\users\hp\appdata\local\programs\python\python35\lib\site-packages (from light
fm)
Requirement already satisfied: scipy>=0.17.0 in c:\users\hp\appdata\local\programs\python\python35\lib\site-packages (fr
om lightfm)
Requirement already satisfied: requests in c:\users\hp\appdata\local\programs\python\python35\lib\site-packages (from li
ghtfm)
Building wheels for collected packages: lightfm
Running setup.py bdist_wheel for lightfm ... error
Complete output from command c:\users\hp\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, t
okenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-gao0_4o3\\lightfm\\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\hp\AppData\Local\Temp\tmpvva8cxrepip-wheel- --python-tag cp35:
Compiling without OpenMP support.
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\lightfm
copying lightfm\evaluation.py -> build\lib.win-amd64-3.5\lightfm
copying lightfm\lightfm.py -> build\lib.win-amd64-3.5\lightfm
copying lightfm\_lightfm_fast.py -> build\lib.win-amd64-3.5\lightfm
copying lightfm\__init__.py -> build\lib.win-amd64-3.5\lightfm
creating build\lib.win-amd64-3.5\lightfm\datasets
copying lightfm\datasets\movielens.py -> build\lib.win-amd64-3.5\lightfm\datasets
copying lightfm\datasets\stackexchange.py -> build\lib.win-amd64-3.5\lightfm\datasets
copying lightfm\datasets\_common.py -> build\lib.win-amd64-3.5\lightfm\datasets
copying lightfm\datasets\__init__.py -> build\lib.win-amd64-3.5\lightfm\datasets
copying lightfm\_lightfm_fast_no_openmp.c -> build\lib.win-amd64-3.5\lightfm
copying lightfm\_lightfm_fast_openmp.c -> build\lib.win-amd64-3.5\lightfm
running build_ext
building 'lightfm._lightfm_fast_no_openmp' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\lightfm
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\u
sers\hp\appdata\local\programs\python\python35\include -Ic:\users\hp\appdata\local\programs\python\python35\include "-IC
:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10
240.0\ucrt" /Tclightfm/_lightfm_fast_no_openmp.c /Fobuild\temp.win-amd64-3.5\Release\lightfm/_lightfm_fast_no_openmp.obj
-ffast-math -march=native
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
_lightfm_fast_no_openmp.c
c:\users\hp\appdata\local\programs\python\python35\include\pyconfig.h(243): fatal error C1083: Cannot open include fil
e: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit st
atus 2
----------------------------------------
Failed building wheel for lightfm
Running setup.py clean for lightfm
Complete output from command c:\users\hp\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, t
okenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-gao0_4o3\\lightfm\\setup.py';f=getattr(tokenize, 'open'
, open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Compiling without OpenMP support.
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --all not recognized
----------------------------------------
Failed cleaning build dir for lightfm
Failed to build lightfm
Installing collected packages: lightfm
Running setup.py install for lightfm ... error
Complete output from command c:\users\hp\appdata\local\programs\python\python35\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-build-gao0_4o3\\lightfm\\setup.py';f=getattr(tokenize, 'ope
n', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --recor
d C:\Users\hp\AppData\Local\Temp\pip-eybv98gb-record\install-record.txt --single-version-externally-managed --compile:
Compiling without OpenMP support.
running install
running build
running build_py
running build_ext
building 'lightfm._lightfm_fast_no_openmp' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:
\users\hp\appdata\local\programs\python\python35\include -Ic:\users\hp\appdata\local\programs\python\python35\include "-
IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.
10240.0\ucrt" /Tclightfm/_lightfm_fast_no_openmp.c /Fobuild\temp.win-amd64-3.5\Release\lightfm/_lightfm_fast_no_openmp.o
bj -ffast-math -march=native
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
_lightfm_fast_no_openmp.c
c:\users\hp\appdata\local\programs\python\python35\include\pyconfig.h(243): fatal error C1083: Cannot open include f
ile: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit
status 2
----------------------------------------
Command "c:\users\hp\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\
Users\\hp\\AppData\\Local\\Temp\\pip-build-gao0_4o3\\lightfm\\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\hp\AppData\Lo
cal\Temp\pip-eybv98gb-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1
in C:\Users\hp\AppData\Local\Temp\pip-build-gao0_4o3\lightfm\
我已经安装了 microsoft visual c++ 14 甚至 miniconda 但仍然是同样的错误。欢迎任何建议。在此先感谢
【问题讨论】:
-
安装时在windows上编译python包是轮盘赌。我通常会下载 Windows 预制轮子。不幸的是,这似乎不存在(还)
标签: python windows failed-installation