在Windows上安装LDA的问题

时间:2018-10-10 14:08:08

标签: python windows python-3.x installation lda

我正在尝试安装python软件包lda,但我一直收到相同的错误。我已经尝试安装“ Visual Studio Build Tools 2017(2)”,并且pip和setuptools都已升级。我正在使用python 3.7

当我尝试以下命令时:

(base) C:\Users\selss>pip install lda

我得到以下输出:

Collecting lda 
Using cached    https://files.pythonhosted.org/packages/81/32/dda1d4afd621f4da8bb3a049da41f42eac5bf66694817091801b7fe6e5c1/lda-1.1.0.tar.gz
Requirement already satisfied: pbr<4,>=0.6 in 
c:\users\selss\appdata\local\continuum\anaconda3\lib\site-packages (from lda) (3.1.1)
Requirement already satisfied: numpy<2.0,>=1.13.0 in 
c:\users\selss\appdata\local\continuum\anaconda3\lib\site-packages (from lda) (1.15.1)
Building wheels for collected packages: lda
Running setup.py bdist_wheel for lda ... error
  Complete output from command c:\users\selss\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\selss\\AppData\\Local\\Temp\\pip-install-f3r5qeof\\lda\\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\selss\AppData\Local\Temp\pip-wheel-uasvq9n7 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.7
  creating build\lib.win-amd64-3.7\lda
  creating build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_datasets.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_lda.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_lda_reuters.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_lda_sparse.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_lda_transform.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\test_utils.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\__init__.py -> build\lib.win-amd64-3.7\lda\tests
  copying lda\datasets.py -> build\lib.win-amd64-3.7\lda
  copying lda\lda.py -> build\lib.win-amd64-3.7\lda
  copying lda\utils.py -> build\lib.win-amd64-3.7\lda
  copying lda\_setup_hooks.py -> build\lib.win-amd64-3.7\lda
  copying lda\__init__.py -> build\lib.win-amd64-3.7\lda running egg_info
  writing lda.egg-info\PKG-INFO
  writing dependency_links to lda.egg-info\dependency_links.txt
  writing requirements to lda.egg-info\requires.txt
  writing top-level names to lda.egg-info\top_level.txt
  [pbr] Reusing existing SOURCES.txt
  copying lda\tests\reuters.ldac -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\reuters.titles -> build\lib.win-amd64-3.7\lda\tests
  copying lda\tests\reuters.tokens -> build\lib.win-amd64-3.7\lda\tests
  copying lda\_lda.c -> build\lib.win-amd64-3.7\lda
  copying lda\_lda.pyx -> build\lib.win-amd64-3.7\lda
  copying lda\gamma.c -> build\lib.win-amd64-3.7\lda
  copying lda\gamma.h -> build\lib.win-amd64-3.7\lda
  running build_ext
  building 'lda._lda' extension
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  creating build\temp.win-amd64-3.7\Release\lda
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\selss\appdata\local\continuum\anaconda3\include -Ic:\users\selss\appdata\local\continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tclda/_lda.c /Fobuild\temp.win-amd64-3.7\Release\lda/_lda.obj
  _lda.c
  lda/_lda.c(2277): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(2286): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(2295): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(2667): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(2676): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(2685): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  lda/_lda.c(18745): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18746): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18747): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18754): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18755): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18756): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18757): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18758): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18759): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18814): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18815): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18816): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18817): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18818): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18819): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18841): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18842): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18843): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18844): error C2039: 'exc_type': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18845): error C2039: 'exc_value': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  lda/_lda.c(18846): error C2039: 'exc_traceback': is not a member of '_ts'
  c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for lda
  Running setup.py clean for lda
Failed to build lda
Installing collected packages: lda
  Running setup.py install for lda ... error
    Complete output from command     c:\users\selss\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\selss\\AppData\\Local\\Temp\\pip-install-f3r5qeof\\lda\\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\selss\AppData\Local\Temp\pip-record-kdxr7df2\install-record.txt --single-version-externally-managed --compile:
running install
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.0s)
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\lda
copying lda\datasets.py -> build\lib.win-amd64-3.7\lda
copying lda\lda.py -> build\lib.win-amd64-3.7\lda
copying lda\utils.py -> build\lib.win-amd64-3.7\lda
copying lda\_setup_hooks.py -> build\lib.win-amd64-3.7\lda
copying lda\__init__.py -> build\lib.win-amd64-3.7\lda
creating build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_datasets.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_lda.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_lda_reuters.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_lda_sparse.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_lda_transform.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\test_utils.py -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\__init__.py -> build\lib.win-amd64-3.7\lda\tests
running egg_info
writing lda.egg-info\PKG-INFO
writing dependency_links to lda.egg-info\dependency_links.txt
writing requirements to lda.egg-info\requires.txt
writing top-level names to lda.egg-info\top_level.txt
[pbr] Reusing existing SOURCES.txt
copying lda\_lda.c -> build\lib.win-amd64-3.7\lda
copying lda\_lda.pyx -> build\lib.win-amd64-3.7\lda
copying lda\gamma.c -> build\lib.win-amd64-3.7\lda
copying lda\gamma.h -> build\lib.win-amd64-3.7\lda
copying lda\tests\reuters.ldac -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\reuters.titles -> build\lib.win-amd64-3.7\lda\tests
copying lda\tests\reuters.tokens -> build\lib.win-amd64-3.7\lda\tests
running build_ext
building 'lda._lda' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\lda
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\selss\appdata\local\continuum\anaconda3\include -Ic:\users\selss\appdata\local\continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tclda/_lda.c /Fobuild\temp.win-amd64-3.7\Release\lda/_lda.obj
_lda.c
lda/_lda.c(2277): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(2286): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(2295): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(2667): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(2676): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(2685): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
lda/_lda.c(18745): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18746): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18747): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18754): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18755): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18756): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18757): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18758): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18759): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18814): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18815): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18816): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18817): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18818): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18819): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18841): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18842): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18843): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18844): error C2039: 'exc_type': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18845): error C2039: 'exc_value': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
lda/_lda.c(18846): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\selss\appdata\local\continuum\anaconda3\include\pystate.h(209): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\users\selss\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\selss\\AppData\\Local\\Temp\\pip-install-f3r5qeof\\lda\\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\selss\AppData\Local\Temp\pip-record-kdxr7df2\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\selss\AppData\Local\Temp\pip-install-f3r5qeof\lda\

以下两行以红色显示:

Failed building wheel for lda

Command "c:\users\selss\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\selss\\AppData\\Local\\Temp\\pip-install-f3r5qeof\\lda\\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\selss\AppData\Local\Temp\pip-record-kdxr7df2\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\selss\AppData\Local\Temp\pip-install-f3r5qeof\lda\

有人可以帮助我正确安装lda吗?

0 个答案:

没有答案