2

当我尝试通过以下方式下载 glove_python 包时

pip install glove_python

我收到以下错误:

  Using cached glove_python-0.1.0.tar.gz (263 kB)
Requirement already satisfied: numpy in c:\users\eweli\appdata\local\continuum\anaconda3\envs\embeddingscode\lib\site-packages (from glove_python) (1.18.4)
Requirement already satisfied: scipy in c:\users\eweli\appdata\local\continuum\anaconda3\envs\embeddingscode\lib\site-packages (from glove_python) (1.4.1)
Building wheels for collected packages: glove-python
  Building wheel for glove-python (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\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\eweli\AppData\Local\Temp\pip-wheel-fqc_1mwe'
       cwd: C:\Users\eweli\AppData\Local\Temp\pip-install-j8qqfg3a\glove-python\
  Complete output (60 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\glove
  copying glove\corpus.py -> build\lib.win-amd64-3.6\glove
  copying glove\glove.py -> build\lib.win-amd64-3.6\glove
  copying glove\__init__.py -> build\lib.win-amd64-3.6\glove
  running build_ext
  building 'glove.glove_cython' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\glove
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcglove/glove_cython.c /Fobuild\temp.win-amd64-3.6\Release\glove/glove_cython.obj -fopenmp -ffast-math
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-fopenmp"
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-ffast-math"
  glove_cython.c
  glove/glove_cython.c(1692): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  glove/glove_cython.c(1701): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  glove/glove_cython.c(2348): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  glove/glove_cython.c(2357): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\libs /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" /EXPORT:PyInit_glove_cython build\temp.win-amd64-3.6\Release\glove/glove_cython.obj /OUT:build\lib.win-amd64-3.6\glove\glove_cython.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\glove\glove_cython.cp36-win_amd64.lib -fopenmp
  LINK : warning LNK4044: nierozpoznana opcja ,/fopenmp"; zignorowano
     Trwa tworzenie biblioteki build\temp.win-amd64-3.6\Release\glove\glove_cython.cp36-win_amd64.lib i obiektu build\temp.win-amd64-3.6\Release\glove\glove_cython.cp36-win_amd64.exp
  Trwa generowanie kodu
  Zakonczono generowanie kodu
  building 'glove.metrics.accuracy_cython' extension
  creating build\temp.win-amd64-3.6\Release\glove\metrics
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcglove/metrics/accuracy_cython.c /Fobuild\temp.win-amd64-3.6\Release\glove/metrics/accuracy_cython.obj -fopenmp -ffast-math
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-fopenmp"
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-ffast-math"
  accuracy_cython.c
  glove/metrics/accuracy_cython.c(1569): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  glove/metrics/accuracy_cython.c(1578): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  glove/metrics/accuracy_cython.c(1587): warning C4244: "=": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  creating C:\Users\eweli\AppData\Local\Temp\pip-install-j8qqfg3a\glove-python\build\lib.win-amd64-3.6\glove\metrics
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\libs /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" /EXPORT:PyInit_accuracy_cython build\temp.win-amd64-3.6\Release\glove/metrics/accuracy_cython.obj /OUT:build\lib.win-amd64-3.6\glove\metrics\accuracy_cython.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\glove/metrics\accuracy_cython.cp36-win_amd64.lib -fopenmp
  LINK : warning LNK4044: nierozpoznana opcja ,/fopenmp"; zignorowano
     Trwa tworzenie biblioteki build\temp.win-amd64-3.6\Release\glove/metrics\accuracy_cython.cp36-win_amd64.lib i obiektu build\temp.win-amd64-3.6\Release\glove/metrics\accuracy_cython.cp36-win_amd64.exp
  Trwa generowanie kodu
  Zakonczono generowanie kodu
  building 'glove.corpus_cython' extension
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpglove/corpus_cython.cpp /Fobuild\temp.win-amd64-3.6\Release\glove/corpus_cython.obj -fopenmp -ffast-math
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-fopenmp"
  cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-ffast-math"
  corpus_cython.cpp
  glove/corpus_cython.cpp(1796): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
  glove/corpus_cython.cpp(2025): warning C4267: "argument": konwersja z "size_t" do "int", mozliwa utrata danych
  glove/corpus_cython.cpp(2235): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
  glove/corpus_cython.cpp(2310): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
  glove/corpus_cython.cpp(3251): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
  glove/corpus_cython.cpp(3403): warning C4244: "argument": konwersja z "double" do "float", mozliwa utrata danych
  glove/corpus_cython.cpp(3431): warning C4244: "argument": konwersja z "double" do "float", mozliwa utrata danych
  glove/corpus_cython.cpp(3457): warning C4244: "argument": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\libs /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" stdc++.lib /EXPORT:PyInit_corpus_cython build\temp.win-amd64-3.6\Release\glove/corpus_cython.obj /OUT:build\lib.win-amd64-3.6\glove\corpus_cython.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\glove\corpus_cython.cp36-win_amd64.lib -fopenmp -ffast-math
  LINK : warning LNK4044: nierozpoznana opcja ,/fopenmp"; zignorowano
  LINK : warning LNK4044: nierozpoznana opcja ,/ffast-math"; zignorowano
  LINK : fatal error LNK1181: nie mozna otworzyc pliku wejsciowego ,stdc++.lib"
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181
  ----------------------------------------
  ERROR: Failed building wheel for glove-python
  Running setup.py clean for glove-python
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: C:\Users\eweli\AppData\Local\Temp\pip-install-j8qqfg3a\glove-python
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: option --all not recognized
  ----------------------------------------
  ERROR: Failed cleaning build dir for glove-python
Failed to build glove-python
Installing collected packages: glove-python
    Running setup.py install for glove-python ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\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\eweli\AppData\Local\Temp\pip-record-jr5q51hf\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\Include\glove-python'
         cwd: C:\Users\eweli\AppData\Local\Temp\pip-install-j8qqfg3a\glove-python\
    Complete output (22 lines):
    running install
    running build
    running build_py
    running build_ext
    building 'glove.corpus_cython' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include -IC:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpglove/corpus_cython.cpp /Fobuild\temp.win-amd64-3.6\Release\glove/corpus_cython.obj -fopenmp -ffast-math
    cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-fopenmp"
    cl : Wiersz polecenia warning D9002 : ignorowanie nieznanej opcji ,-ffast-math"
    corpus_cython.cpp
    glove/corpus_cython.cpp(1796): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
    glove/corpus_cython.cpp(2025): warning C4267: "argument": konwersja z "size_t" do "int", mozliwa utrata danych
    glove/corpus_cython.cpp(2235): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
    glove/corpus_cython.cpp(2310): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
    glove/corpus_cython.cpp(3251): warning C4267: "=": konwersja z "size_t" do "int", mozliwa utrata danych
    glove/corpus_cython.cpp(3403): warning C4244: "argument": konwersja z "double" do "float", mozliwa utrata danych
    glove/corpus_cython.cpp(3431): warning C4244: "argument": konwersja z "double" do "float", mozliwa utrata danych
    glove/corpus_cython.cpp(3457): warning C4244: "argument": konwersja z "Py_ssize_t" do "int", mozliwa utrata danych
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\libs /LIBPATH:C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" stdc++.lib /EXPORT:PyInit_corpus_cython build\temp.win-amd64-3.6\Release\glove/corpus_cython.obj /OUT:build\lib.win-amd64-3.6\glove\corpus_cython.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\glove\corpus_cython.cp36-win_amd64.lib -fopenmp -ffast-math
    LINK : warning LNK4044: nierozpoznana opcja ,/fopenmp"; zignorowano
    LINK : warning LNK4044: nierozpoznana opcja ,/ffast-math"; zignorowano
    LINK : fatal error LNK1181: nie mozna otworzyc pliku wejsciowego ,stdc++.lib"
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\eweli\\AppData\\Local\\Temp\\pip-install-j8qqfg3a\\glove-python\\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\eweli\AppData\Local\Temp\pip-record-jr5q51hf\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\eweli\AppData\Local\Continuum\anaconda3\envs\EmbeddingsCode\Include\glove-python' Check the logs for full command output.

我在网上找到了一些答案,声称解决方案可能是使用不同的 python 版本。我尝试使用 3.6.9、3.6.10 和 3.7.7 版本,但没有解决问题。

我还尝试更新 setuptools 包,但也没有帮助。

上述错误与 python 版本 3.6.9 和 setuptools 版本 46.2.0

安装出了什么问题?如何解决这个问题呢?

4

1 回答 1

0

这应该有效:

pip install glove-python-binary

于 2021-02-27T20:00:19.353 回答