Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on pip install snips-nlu on Windows #891

Open
ngoc-quoc-huynh opened this issue Nov 15, 2020 · 2 comments
Open

Error on pip install snips-nlu on Windows #891

ngoc-quoc-huynh opened this issue Nov 15, 2020 · 2 comments

Comments

@ngoc-quoc-huynh
Copy link

ngoc-quoc-huynh commented Nov 15, 2020

Hey I tried to install snips-nlu. I am using the anaconda promt but using the pip install snips-nlu occurs to this error. I tried it with and without a virtual environment.
image
If I try to with Rust and setuptools_rust this error occurs:

     command: 'C:\Users\QuocH\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\QuocH\\AppData\\Local\\Temp\\pip-install-p93p_qsv\\snips-nlu-utils\\setup.py'"'"'; __file__='"'"'C:\\Users\\QuocH\\AppData\\Local\\Temp\\pip-install-p93p_qsv\\snips-nlu-utils\\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\QuocH\AppData\Local\Temp\pip-record-r9c2r8v3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\QuocH\anaconda3\Include\snips-nlu-utils'
         cwd: C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\
    Complete output (73 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\snips_nlu_utils
    copying snips_nlu_utils\string.py -> build\lib.win-amd64-3.8\snips_nlu_utils
    copying snips_nlu_utils\token.py -> build\lib.win-amd64-3.8\snips_nlu_utils
    copying snips_nlu_utils\utils.py -> build\lib.win-amd64-3.8\snips_nlu_utils
    copying snips_nlu_utils\__init__.py -> build\lib.win-amd64-3.8\snips_nlu_utils
    running egg_info
    writing snips_nlu_utils.egg-info\PKG-INFO
    writing dependency_links to snips_nlu_utils.egg-info\dependency_links.txt
    writing requirements to snips_nlu_utils.egg-info\requires.txt
    writing top-level names to snips_nlu_utils.egg-info\top_level.txt
    reading manifest file 'snips_nlu_utils.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.so' under directory 'snips_nlu_utils'
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
    writing manifest file 'snips_nlu_utils.egg-info\SOURCES.txt'
    copying snips_nlu_utils\__version__ -> build\lib.win-amd64-3.8\snips_nlu_utils
    running build_ext
    running build_rust
    cargo rustc --lib --manifest-path ffi\Cargo.toml --target x86_64-pc-windows-msvc --release --verbose -- --crate-type cdylib
       Compiling proc-macro2 v1.0.24
       Compiling unicode-xid v0.2.1
       Compiling autocfg v1.0.1
       Compiling syn v1.0.48
         Running `rustc --crate-name build_script_build --edition=2018 C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro2-1.0.24\build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg "feature=\"default\"" --cfg "feature=\"proc-macro\"" -C metadata=2c793573430cd6ae -C extra-filename=-2c793573430cd6ae --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\build\proc-macro2-2c793573430cd6ae -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow`
         Running `rustc --crate-name unicode_xid C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\unicode-xid-0.2.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg "feature=\"default\"" -C metadata=99e12348a6d91eee -C extra-filename=-99e12348a6d91eee --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow`
         Running `rustc --crate-name autocfg C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\autocfg-1.0.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=f6b446e7062100f1 -C extra-filename=-f6b446e7062100f1 --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow`
         Running `rustc --crate-name build_script_build --edition=2018 C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\syn-1.0.48\build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg "feature=\"clone-impls\"" --cfg "feature=\"default\"" --cfg "feature=\"derive\"" --cfg "feature=\"extra-traits\"" --cfg "feature=\"parsing\"" --cfg "feature=\"printing\"" --cfg "feature=\"proc-macro\"" --cfg "feature=\"quote\"" --cfg "feature=\"visit\"" -C metadata=9679ab2621ccf09a -C extra-filename=-9679ab2621ccf09a --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\build\syn-9679ab2621ccf09a -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow`
       Compiling libc v0.2.80
         Running `rustc --crate-name build_script_build C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.80\build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=44322446d0bf0b05 -C extra-filename=-44322446d0bf0b05 --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\build\libc-44322446d0bf0b05 -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow`
    error: linker `link.exe` not found
      |
      = note: Das System kann die angegebene Datei nicht finden. (os error 2)

    note: the msvc targets depend on the msvc linker but `link.exe` was not found

    note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option

    error: aborting due to previous error

    error: could not compile `syn`.

    Caused by:
      process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 C:\Users\QuocH\.cargo\registry\src\github.com-1ecc6299db9ec823\syn-1.0.48\build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg "feature=\"clone-impls\"" --cfg "feature=\"default\"" --cfg "feature=\"derive\"" --cfg "feature=\"extra-traits\"" --cfg "feature=\"parsing\"" --cfg "feature=\"printing\"" --cfg "feature=\"proc-macro\"" --cfg "feature=\"quote\"" --cfg "feature=\"visit\"" -C metadata=9679ab2621ccf09a -C extra-filename=-9679ab2621ccf09a --out-dir C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\build\syn-9679ab2621ccf09a -L dependency=C:\Users\QuocH\AppData\Local\Temp\pip-install-p93p_qsv\snips-nlu-utils\ffi\target\release\deps --cap-lints allow` (exit code: 1)
    warning: build failed, waiting for other jobs to finish...
    error: linker `link.exe` not found
      |
      = note: Das System kann die angegebene Datei nicht finden. (os error 2)

    note: the msvc targets depend on the msvc linker but `link.exe` was not found

    note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option

    error: aborting due to previous error

    error: linker `link.exe` not found
      |
      = note: Das System kann die angegebene Datei nicht finden. (os error 2)

    note: the msvc targets depend on the msvc linker but `link.exe` was not found

    note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option

    error: aborting due to previous error

    error: build failed
    error: cargo failed with code: 101

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\QuocH\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\QuocH\\AppData\\Local\\Temp\\pip-install-p93p_qsv\\snips-nlu-utils\\setup.py'"'"'; __file__='"'"'C:\\Users\\QuocH\\AppData\\Local\\Temp\\pip-install-p93p_qsv\\snips-nlu-utils\\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\QuocH\AppData\Local\Temp\pip-record-r9c2r8v3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\QuocH\anaconda3\Include\snips-nlu-utils' Check the logs for full command output.```
@MarcTreySonos
Copy link

note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option

as stated in the log, did you install a linker ?

@Strangemother
Copy link

Upgrading pip corrected this issue for me. It's a general fault with pip ~= 19 now version 21 is available.

python -m pip install --upgrade pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants