首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在windows上安装lightfm

在windows上安装lightfm
EN

Stack Overflow用户
提问于 2017-03-25 02:37:16
回答 3查看 4.8K关注 0票数 0

我已经尝试了好几天来实现这一点。因此,请接受任何建议。我试着在我的windows上安装lightfm,但是我总是出现这个错误。

代码语言:javascript
复制
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,但仍然出现相同的错误。欢迎提出任何建议。提前感谢

EN

回答 3

Stack Overflow用户

发布于 2018-03-15 20:22:55

尝试此选项:

代码语言:javascript
复制
$ conda install -c conda-forge lightfm
票数 1
EN

Stack Overflow用户

发布于 2017-03-25 02:56:45

你有没有尝试过通过pip或者通过它的Git库来安装它?

他们的documentation状态:

使用pip:pip install lightfm从pypi安装

。在Linux、使用Homebrew Python的OSX和使用Miniconda的Windows上,一切都应该开箱即用。

你是否使用了操作系统合适的包管理器?你确定它可以和你正在使用的python3.5一起工作吗?

请注意,在their git-page上,似乎只有Linux操作系统可以完全通过,而其他主要操作系统(macOS和Windows)则没有。这让我相信pip-install可能仍然不稳定。也许你可以尝试一下开发-安装技巧?或者在Git上提交一个问题。

票数 0
EN

Stack Overflow用户

发布于 2019-03-30 20:56:33

在Windows操作系统上,我遇到了和你一样的问题。尝试使用conda安装软件包,方法是运行以下命令之一:

conda install -c conda-forge lightfm

conda install -c conda-forge/label/gcc7 lightfm

conda install -c conda-forge/label/cf201901 lightfm

第三个命令行适用于我。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43006883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档