Bergvca / string_grouper

Super Fast String Matching in Python
MIT License
364 stars 76 forks source link

Installation problem #59

Closed skwolvie closed 3 years ago

skwolvie commented 3 years ago

System: Windows 10

(base) C:\Users\sachi>python --version
Python 3.8.10

(base) C:\Users\sachi>pip --version
pip 21.1.2 from c:\users\sachi\anaconda3\lib\site-packages\pip (python 3.8)
(base) C:\Users\sachi>pip install string-grouper==0.2.2
Collecting string-grouper==0.2.2
  Downloading string_grouper-0.2.2-py3-none-any.whl (11 kB)
Requirement already satisfied: pandas>=0.25.3 in c:\users\sachi\anaconda3\lib\site-packages (from string-grouper==0.2.2) (1.2.4)
Requirement already satisfied: numpy in c:\users\sachi\anaconda3\lib\site-packages (from string-grouper==0.2.2) (1.20.2)
Requirement already satisfied: scipy in c:\users\sachi\anaconda3\lib\site-packages (from string-grouper==0.2.2) (1.6.2)
Requirement already satisfied: scikit-learn in c:\users\sachi\anaconda3\lib\site-packages (from string-grouper==0.2.2) (0.24.2)
Collecting sparse-dot-topn>=0.2.6
  Downloading sparse_dot_topn-0.3.1.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\sachi\anaconda3\lib\site-packages (from pandas>=0.25.3->string-grouper==0.2.2) (2.8.1)
Requirement already satisfied: pytz>=2017.3 in c:\users\sachi\anaconda3\lib\site-packages (from pandas>=0.25.3->string-grouper==0.2.2) (2021.1)
Requirement already satisfied: six>=1.5 in c:\users\sachi\anaconda3\lib\site-packages (from python-dateutil>=2.7.3->pandas>=0.25.3->string-grouper==0.2.2) (1.15.0)
Requirement already satisfied: setuptools>=42 in c:\users\sachi\anaconda3\lib\site-packages (from sparse-dot-topn>=0.2.6->string-grouper==0.2.2) (57.0.0)
Requirement already satisfied: cython>=0.29.15 in c:\users\sachi\anaconda3\lib\site-packages (from sparse-dot-topn>=0.2.6->string-grouper==0.2.2) (0.29.21)
Requirement already satisfied: joblib>=0.11 in c:\users\sachi\anaconda3\lib\site-packages (from scikit-learn->string-grouper==0.2.2) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\sachi\anaconda3\lib\site-packages (from scikit-learn->string-grouper==0.2.2) (2.1.0)
Building wheels for collected packages: sparse-dot-topn
  Building wheel for sparse-dot-topn (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\sachi\anaconda3\python.exe' 'c:\users\sachi\anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\sachi\AppData\Local\Temp\tmpo7rfwtmy'
       cwd: C:\Users\sachi\AppData\Local\Temp\pip-install-kg_5az86\sparse-dot-topn_4981ea8a5fd046dba8d68b644d539e9b
  Complete output (37 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\awesome_cossim_topn.py -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\__init__.py -> build\lib.win-amd64-3.8\sparse_dot_topn
  running egg_info
  writing sparse_dot_topn.egg-info\PKG-INFO
  writing dependency_links to sparse_dot_topn.egg-info\dependency_links.txt
  writing requirements to sparse_dot_topn.egg-info\requires.txt
  writing top-level names to sparse_dot_topn.egg-info\top_level.txt
  reading manifest file 'sparse_dot_topn.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'sparse_dot_topn.egg-info\SOURCES.txt'
  copying sparse_dot_topn\array_wrappers.pxd -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\array_wrappers.pyx -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn.pyx -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn_parallel.cpp -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn_parallel.h -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn_source.cpp -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn_source.h -> build\lib.win-amd64-3.8\sparse_dot_topn
  copying sparse_dot_topn\sparse_dot_topn_threaded.pyx -> build\lib.win-amd64-3.8\sparse_dot_topn
  running build_ext
  cythoning ./sparse_dot_topn/array_wrappers.pyx to ./sparse_dot_topn\array_wrappers.cpp
  cythoning ./sparse_dot_topn/sparse_dot_topn.pyx to ./sparse_dot_topn\sparse_dot_topn.cpp
  cythoning ./sparse_dot_topn/sparse_dot_topn_threaded.pyx to ./sparse_dot_topn\sparse_dot_topn_threaded.cpp
  building 'sparse_dot_topn.array_wrappers' extension
  C:\Users\sachi\AppData\Local\Temp\pip-build-env-ah2hjm16\normal\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\sachi\AppData\Local\Temp\pip-install-kg_5az86\sparse-dot-topn_4981ea8a5fd046dba8d68b644d539e9b\sparse_dot_topn\array_wrappers.pxd
    tree = Parsing.p_module(s, pxd, full_module_name)
  C:\Users\sachi\AppData\Local\Temp\pip-build-env-ah2hjm16\normal\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\sachi\AppData\Local\Temp\pip-install-kg_5az86\sparse-dot-topn_4981ea8a5fd046dba8d68b644d539e9b\sparse_dot_topn\sparse_dot_topn.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  C:\Users\sachi\AppData\Local\Temp\pip-build-env-ah2hjm16\normal\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\sachi\AppData\Local\Temp\pip-install-kg_5az86\sparse-dot-topn_4981ea8a5fd046dba8d68b644d539e9b\sparse_dot_topn\sparse_dot_topn_threaded.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for sparse-dot-topn
Failed to build sparse-dot-topn
ERROR: Could not build wheels for sparse-dot-topn which use PEP 517 and cannot be installed directly
ParticularMiner commented 3 years ago

Hi @skwolvie

From your error messages it looks like this is an issue for sparse_dot_topn developers. Follow this link to open your issue there.

But it looks like if you would install Microsoft Visual C++ (download from here before installing string_grouper you would solve your issue.

skwolvie commented 3 years ago

https://www.scivision.dev/python-windows-visual-c-14-required