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

Can't install pip requirements when installing Spacy from source #4581

Closed
jamescrone1 opened this issue Nov 4, 2019 · 3 comments
Closed
Labels
install Installation issues windows Issues related to Windows

Comments

@jamescrone1
Copy link

I'm having extreme issues trying to install spaCy locally, I've read all the docs, and have tried searching online to see if I could find someone having the same problem as me, but haven't been able to solve it.

I'm wanting to use spaCy for a machine learning project I'm working on with university.
I'm using a new windows 10 laptop that I haven't used for any other development so far, so this means I've had to start from scratch in regards to build tools, python language etc.

Python language -> 3.8.0 64 bit.
Visual studio -> tried C++build tools/ express for 2017 & 2019 editions.

How to reproduce the problem

I initially tried 'pip install spacy' & 'pip install -U spacy' but this fails when installing backend dependencies. When these both failed, I checked my pip was updated (tried deleting pip cache as well), and my python was definitely 64-bit. The summarised error I got is below:

ERROR: Command errored out with exit status 1: 'c:\users\james\appdata\local\programs\python\python38\python.exe' 'c:\users\james\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\james\AppData\Local\Temp\pip-build-env-0thrl73l\normal' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'thinc<7.4.0,>=7.3.0' 'preshed<3.1.0,>=3.0.2' 'murmurhash<1.1.0,>=0.28.0' 'cython>=0.25' 'cymem<2.1.0,>=2.0.2' wheel Check the logs for full command output.

I then tried to install it from source, using a virtual environment. So I followed the commands on the website. And it was cloning okay, but then it was failing when I tried to install the pip requirements. I don't think it can successfully install blis, I also tried to do this individually but got the same error.

pip install -r requirements.txt
pip install blis

resulting in the following error

  ERROR: Failed building wheel for blis
  Running setup.py clean for blis
Failed to build blis
Installing collected packages: blis, wasabi, thinc, idna, chardet, certifi, urllib3, requests, six, attrs, pyrsistent, jsonschema, cython, colorama, pyparsing, packaging, more-itertools, pluggy, wcwidth, py, atomicwrites, pytest, pytest-timeout, pbr, mock, pycodestyle, pyflakes, mccabe, flake8
    Running setup.py install for blis ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\james\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\james\\AppData\\Local\\Temp\\pip-install-ji3x7tdk\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\james\\AppData\\Local\\Temp\\pip-install-ji3x7tdk\\blis\\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\james\AppData\Local\Temp\pip-record-oiva8fcv\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\james\AppData\Local\Temp\pip-install-ji3x7tdk\blis\
    Complete output (25 lines):
    BLIS_COMPILER? None
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\blis
    copying blis\about.py -> build\lib.win-amd64-3.8\blis
    copying blis\benchmark.py -> build\lib.win-amd64-3.8\blis
    copying blis\__init__.py -> build\lib.win-amd64-3.8\blis
    creating build\lib.win-amd64-3.8\blis\tests
    copying blis\tests\common.py -> build\lib.win-amd64-3.8\blis\tests
    copying blis\tests\test_dotv.py -> build\lib.win-amd64-3.8\blis\tests
    copying blis\tests\test_gemm.py -> build\lib.win-amd64-3.8\blis\tests
    copying blis\tests\__init__.py -> build\lib.win-amd64-3.8\blis\tests
    copying blis\cy.pyx -> build\lib.win-amd64-3.8\blis
    copying blis\py.pyx -> build\lib.win-amd64-3.8\blis
    copying blis\cy.pxd -> build\lib.win-amd64-3.8\blis
    copying blis\__init__.pxd -> build\lib.win-amd64-3.8\blis
    running build_ext
    msvc
    py_compiler msvc
    {'APPVEYOR_REPO_COMMIT_AUTHOR': 'Matthew Honnibal', 'LIB': 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.14393.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.14393.0\\um\\x64;', 'VS100COMNTOOLS': 'c:

Any ideas what's going on here? I have tried uninstalling python, visual studio and reinstalling these but nothing seems to work. Is spacy supported on python 3.8.0? I'm wondering if it's an issue with my compiler but I'm honestly not sure, i'm assuming if blis can be installed, it would work fine. Any help would be greatly appreciated.

Your Environment

  • Operating System: Windows 10
  • Python Version Used: 3.8.0
  • spaCy Version Used: latest version
  • Environment Information: Using windows powercell & git bash to run commands, tried installing library on pycharm as well, but it also didnt't work
@ines ines added the install Installation issues label Nov 4, 2019
@ines
Copy link
Member

ines commented Nov 4, 2019

I think the main thing that's causing problems here is that you're using Python 3.8. We can't yet ship pre-compiled wheels for Python 3.8 (unfortunately it's not fully supported by any CI providers we use at the moment), so if you want to install spaCy on 3.8, you have to build everything from source. And that seems to fail, likely due to how your compiler is configured, which is not correct for compiling blis.

Simplest solution: use Python 3.7 for now.

@ines ines added the windows Issues related to Windows label Nov 4, 2019
@jamescrone1
Copy link
Author

That's great, thanks for your help! I'll just use python 3.7 then which is fine 😃

@lock
Copy link

lock bot commented Dec 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
install Installation issues windows Issues related to Windows
Projects
None yet
Development

No branches or pull requests

2 participants