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

Installing scattertext on Windows #26

Closed
limorigu opened this issue Mar 1, 2018 · 3 comments
Closed

Installing scattertext on Windows #26

limorigu opened this issue Mar 1, 2018 · 3 comments

Comments

@limorigu
Copy link

limorigu commented Mar 1, 2018

Dear Jason and scattertext community,

I'm trying to install scattertext on my windows machine via pip for the past few hours and found it extremely frustrating. I installed most dependencies by downloading wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/, but one doesn't exist for scattertext.

I've been googling to exhaustion people with similar issues. Many times they suggest reinstalling visual studio and/or adding folders to PATH environment variable. I keep on running into new issues each time. (I keep on failing with fatal error C1083: Cannot open include file: 'io.h': No such file or directory when the installation tries to build wheels of cytoolz, thinc and spacy, even though I pre-installed them from wheels taken from the link above. If I fix the io.h issue by changing the include directory with the command line set, it then cannot include vcruntime.h, which lives in a different directory. Adding both of them to path doesn't resolve the issue.)
It looks something like this:

`C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\l.gultchin\appdata\local\programs\python\python36-32\include -Ic:\users\l.gultchin\appdata\local\programs\python\python36-32\include /Tccytoolz/dicttoolz.c /Fobuild\temp.win32-3.6\Release\cytoolz/dicttoolz.obj
    dicttoolz.c
    c:\users\l.gultchin\appdata\local\programs\python\python36-32\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 2

Command "c:\users\l.gultchin\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\L519E~1.GUL\\AppData\\Local\\Temp\\pip-build-uzgnn5ct\\cytoolz\\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\L519E~1.GUL\AppData\Local\Temp\pip-xx_x6kfv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\L519E~1.GUL\AppData\Local\Temp\pip-build-uzgnn5ct\cytoolz\`

I also saw you comment on

this post, #15

and tried installing miniconda and going through that route, but unfortunately I couldn't locate the relevant file in conda-forge for some reason.

`(base) C:\Users\l.gultchin>conda config --add channels conda-forge

(base) C:\Users\l.gultchin>conda install scattertext
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - scattertext

Current channels:

  - https://conda.anaconda.org/conda-forge/win-32
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.continuum.io/pkgs/main/win-32
  - https://repo.continuum.io/pkgs/main/noarch
  - https://repo.continuum.io/pkgs/free/win-32
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/win-32
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/win-32
  - https://repo.continuum.io/pkgs/pro/noarch
  - https://repo.continuum.io/pkgs/msys2/win-32
  - https://repo.continuum.io/pkgs/msys2/noarch`

Has anyone dealt with this issue successfully and might have any insight?

Many thanks,
Limor

  • Operating System: Windows 10, 64-bit
  • Python Version Used: 3.6
  • Scattertext Version Used: latest
  • Environment Information: Tried miniconda and my local environment
@JasonKessler
Copy link
Owner

Hi Limor,

Sorry to hear about your problems installing the package.

I just removed a number of packages from the install requirements, and all you'll need is numpy, scipy, scikit-learn, and pandas. You'll need sPacy to run some of the example code, but you could always use a call to st.whitespace_nlp_with_sentences to use dumb regex tokenization and punctuation-based sentence segmentation.

Please try to run pip install scattertext again, and let me know if this works.

Jason

@limorigu
Copy link
Author

limorigu commented Mar 6, 2018

Hi Jason,

Thanks so much for your helpful comment! In fact, I ended up using the package on a mac I found, on which it worked perfectly. I got too frustrated with spending so much time on installation on Windows.

Thanks again for taking the time to answer, and for developing this to begin with, you did an awesome job!
Limor

@JasonKessler
Copy link
Owner

Great to hear!

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

2 participants