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

Import/build issue #17

Closed
dkrasner opened this issue Feb 2, 2015 · 9 comments
Closed

Import/build issue #17

dkrasner opened this issue Feb 2, 2015 · 9 comments

Comments

@dkrasner
Copy link

dkrasner commented Feb 2, 2015

Both pip install and installing from source end "successfully," but

python -m spacy.en.download

as well as

from spacy.en import English
throw an ImportError
      5 from .. import orth
----> 6 from ..vocab import Vocab
      7 from ..tokenizer import Tokenizer
      8 from ..syntax.parser import GreedyParser

ImportError: dlopen(/Users/dk/anaconda/lib/python2.7/site-packages/spacy/vocab.so, 2): Symbol not found: __ZSt20__throw_length_errorPKc
  Referenced from: /Users/dk/anaconda/lib/python2.7/site-packages/spacy/vocab.so
  Expected in: dynamic lookup

I am using the conda dist of python on Mac 10.10

Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46)

and installed spaCy 0.40

This seems like a build issue, but not errors occur during... Also, I was able to install everything properly on a Ubuntu both with the same conda python dist.

If you have any ideas, that would be much appreciated.

@jagill
Copy link

jagill commented Feb 11, 2015

I am having a very similar problem. OS X 10.9, Python 2.7.5, pip 1.5.5

@geovedi
Copy link
Contributor

geovedi commented Feb 16, 2015

Weird, no problem here with Conda 3.8.4 on OSX and Linux (Ubuntu) with spaCy 0.64 (rev. master). Maybe because I did change some settings in my local miniconda/lib/python2.7/_sysconfigdata.py.

Anyway, Try to set CXXFLAGS and LDFLAGS before build.

export CXXFLAGS='-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.8'
export LDFLAGS='-lc++'

@dkrasner
Copy link
Author

not yet; exporting the flags above didn't help

@honnibal
Copy link
Member

Try again with CPPFLAGS instead of CXXFLAGS.

The version in master solves this, but in a brittle way. It changes the compile flags by asking whether the sys.platform is 'darwin'. However, this won't work if you're using GCC on OSX. I'm working on a better solution.

@muzaluisa
Copy link

Dear coders,
I am running installation on Windows 7, Python 2.7.5 and I get the following error after trying to make this command: python -m spacy.en.download
cannot import name VisibleDeprecationWarning

What went wrong?

@honnibal
Copy link
Member

honnibal commented Mar 4, 2015

What went wrong

You used Windows.

Windows support is planned, and it's not fundamentally broken. But I don't have any easy way to test on a Windows machine, so it's difficult to make sure it works easily at the moment.

Please see #13 for clues.

@dkrasner
Copy link
Author

dkrasner commented Mar 4, 2015

@honnibal trying with CPPFLAGS flags instead and the current version in master I was able to install
and

from spacy.en import English

no longer throws an error. However,

python -m spacy.en.download

throws this error/traceback

Moving existing dir /Users/danielkrasner/REPOS/spacy/spacy/en/data to /tmp
100% [......................................................................] 204625920 / 204625920Traceback (most recent call last):
  File "/Users/danielkrasner/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/danielkrasner/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/danielkrasner/REPOS/spacy/spacy/en/download.py", line 60, in <module>
    plac.call(main)
  File "/Users/danielkrasner/anaconda/lib/python2.7/site-packages/plac_core.py", line 309, in call
    cmd, result = parser_from(obj).consume(arglist)
  File "/Users/danielkrasner/anaconda/lib/python2.7/site-packages/plac_core.py", line 195, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/danielkrasner/REPOS/spacy/spacy/en/download.py", line 56, in main
    install_data(data_url, path.dirname(DEST_DIR))
  File "/Users/danielkrasner/REPOS/spacy/spacy/en/download.py", line 31, in install_data
    t.extractall(dest_dir)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 2051, in extractall
    self.extract(tarinfo, path)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 2088, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 2164, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 2205, in makefile
    copyfileobj(source, target)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 265, in copyfileobj
    shutil.copyfileobj(src, dst)
  File "/Users/danielkrasner/anaconda/lib/python2.7/shutil.py", line 49, in copyfileobj
    buf = fsrc.read(length)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 818, in read
    buf += self.fileobj.read(size - len(buf))
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 736, in read
    return self.readnormal(size)
  File "/Users/danielkrasner/anaconda/lib/python2.7/tarfile.py", line 745, in readnormal
    return self.fileobj.read(size)
  File "/Users/danielkrasner/anaconda/lib/python2.7/gzip.py", line 261, in read
    self._read(readsize)
  File "/Users/danielkrasner/anaconda/lib/python2.7/gzip.py", line 308, in _read
    self._read_eof()
  File "/Users/danielkrasner/anaconda/lib/python2.7/gzip.py", line 347, in _read_eof
    hex(self.crc)))
IOError: CRC check failed 0x8d6b7aa6 != 0x32c9a298L

@honnibal
Copy link
Member

honnibal commented Mar 5, 2015

Thanks, fixed the 0.7 data file --- the upload had failed. Try again.

@lock
Copy link

lock bot commented May 9, 2018

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 May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@jagill @geovedi @dkrasner @honnibal @muzaluisa and others