【问题标题】:Installing python-crfsuite fails with [WinError 2] The system cannot find the file specified安装 python-crfsuite 失败并出现 [WinError 2] 系统找不到指定的文件
【发布时间】:2016-07-03 11:04:53
【问题描述】:

我尝试安装

$ pip install python-crfsuite

Collecting python-crfsuite
Using cached python-crfsuite-0.8.4.tar.gz
Installing collected packages: python-crfsuite
Running setup.py install for python-crfsuite
Complete output from command c:\users\vlats\appdata\local\programs    \python    \python35-32\python.exe -c "import setuptools, tokenize;file='C:\Users\Vlats\AppData\Local\Temp\pip-build-k0g40k7c\python-crfsuite\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record     C:\Users\Vlats\AppData\Local\Temp\pip-6zahugn5-record\install-    record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\pycrfsuite
copying pycrfsuite_dumpparser.py -> build\lib.win32-3.5\pycrfsuite
copying pycrfsuite_logparser.py -> build\lib.win32-3.5\pycrfsuite
copying pycrfsuite__init__.py -> build\lib.win32-3.5\pycrfsuite
running build_ext
building 'pycrfsuite._pycrfsuite' extension
error: [WinError 2] The system cannot find the file specified

命令 "c:\users\vlats\appdata\local\programs\python\python35-32\python.exe -c "import setuptools, tokenize;file='C:\Users\Vlats\AppData\Local\Temp \pip-build-k0g40k7c\python-crfsuite\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n '), 文件, 'exec'))" install --record C:\Users\Vlats\AppData\Local\Temp\pip-6zahugn5-record\install-record.txt --single-version-externally-managed --编译”
C:\Users\Vlats\AppData\Local\Temp\pip-build-k0g40k7c\python-crfsuite 中的错误代码 1 失败

关于导致错误的任何想法:[WinError 2]系统找不到指定的文件以及随后的编译步骤失败并出现错误1?

我有哪些解决方法?还是使用pip install不是安装python-crfsuite的正确方法?

【问题讨论】:

    标签: python-3.x crf


    【解决方案1】:

    可能为时已晚,但对于找到此页面的其他人来说,这里是解决方案...

    你需要这个:https://www.microsoft.com/en-us/download/details.aspx?id=44266

    我得到了与你相同的错误输出,但我的一个同事得到了以下输出。这就是我们找到解决方案的方法。


    python -m pip install python-crfsuite
    Collecting python-crfsuite
    Using cached python-crfsuite-0.8.4.tar.gz
    Installing collected packages: python-crfsuite
    Running setup.py install for python-crfsuite ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\mweinb~1\appdata\local\temp\pip-build-hivnxb\python-crfsuite\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\mweinb~1\appdata\local\temp\pip-izyeu8-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    creating build\lib.win32-2.7\pycrfsuite
    copying pycrfsuite_dumpparser.py -> build\lib.win32-2.7\pycrfsuite
    copying pycrfsuite_logparser.py -> build\lib.win32-2.7\pycrfsuite
    copying pycrfsuite__init__.py -> build\lib.win32-2.7\pycrfsuite
    running build_ext
    building 'pycrfsuite._pycrfsuite' extension
    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
    
    Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\mweinb~1\appdata\local\temp\pip-build-hivnxb\python-crfsuite\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\mweinb~1\appdata\local\temp\pip-izyeu8-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\mweinb~1\appdata\local\temp\pip-build-hivnxb\python-crfsuite\
    

    【讨论】:

      猜你喜欢
      • 2020-08-23
      • 1970-01-01
      • 2020-01-02
      • 2021-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-21
      • 1970-01-01
      相关资源
      最近更新 更多