chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.22k stars 250 forks source link

spacy morphology size changed #304

Closed aliforgetti closed 2 years ago

aliforgetti commented 4 years ago

steps to reproduce

Ran into this error when trying to: import textacy

expected vs. actual behavior

This is the resulting error

ValueError: spacy.morphology.Morphology size changed, may indicate binary incompatibility. Expected 112 from C header, got 104 from PyObject

Expected it to import textacy

possible solution?

Downgrading to an older version of spacy but do I really need to do that?

context

environment

Name                    Version                   Build  Channel
alabaster                 0.7.12                   py37_0
argh                      0.26.2                   py37_0
arrow                     0.15.7           py37hc8dfbb8_0    conda-forge
astroid                   2.3.3                    py37_0
atomicwrites              1.4.0                      py_0
attrs                     19.3.0                     py_0
autopep8                  1.4.3                    py37_0
babel                     2.8.0                      py_0
backcall                  0.2.0                      py_0
bcrypt                    3.1.7            py37he774522_1
beautifulsoup4            4.9.1                    py37_0
binaryornot               0.4.4                      py_1    conda-forge
blas                      1.0                         mkl
bleach                    3.1.5                      py_0
bokeh                     2.1.1            py37hc8dfbb8_0    conda-forge
boto                      2.49.0                   py37_0    anaconda
boto3                     1.9.66                   py37_0    anaconda
botocore                  1.12.189                   py_0    anaconda
brotlipy                  0.7.0           py37he774522_1000
bs4                       4.9.1                         0
ca-certificates           2020.6.20            hecda079_0    conda-forge
cachetools                4.1.0                      py_1    anaconda
catalogue                 1.0.0                      py_0    conda-forge
certifi                   2020.6.20        py37hc8dfbb8_0    conda-forge
cffi                      1.14.0           py37h7a1dbc1_0
chardet                   3.0.4                 py37_1003
click                     7.1.2                      py_0
cloudpickle               1.4.1                      py_0
colorama                  0.4.3                      py_0
configparser              5.0.0                    pypi_0    pypi
cookiecutter              1.7.2              pyh9f0ad1d_0    conda-forge
crayons                   0.3.1                    pypi_0    pypi
cryptography              2.9.2            py37h7a1dbc1_0
cycler                    0.10.0                   py37_0
cymem                     2.0.3            py37ha925a31_0
cython-blis               0.4.1            py37h8055547_1    conda-forge
cytoolz                   0.9.0.1          py37hfa6e2cd_1
daal                      2020.2                intel_254    intel
daal4py                   2020.1           py37ha68da19_0    intel
dask                      2.20.0                     py_0
dask-core                 2.20.0                     py_0
decorator                 4.4.2                      py_0
defusedxml                0.6.0                      py_0
diff-match-patch          20181111                   py_0
dill                      0.2.9                    py37_0
distributed               2.20.0                   py37_0
docutils                  0.16                     py37_1
en-core-web-sm            2.0.0                    pypi_0    pypi
entrypoints               0.3                      py37_0
flake8                    3.7.9                    py37_0
freetype                  2.10.2               hd328e21_0
fsspec                    0.7.4                      py_0    conda-forge
funcy                     1.14                       py_0    conda-forge
future                    0.18.2                   py37_1
gensim                    3.8.0            py37hf9181ef_0    anaconda
google-api-core           1.17.0           py37h21ff451_0    anaconda
google-auth               1.14.1                     py_0    anaconda
google-cloud-core         1.3.0                      py_0    anaconda
google-cloud-storage      1.28.0                     py_0    anaconda
google-resumable-media    0.5.0                      py_1    anaconda
googleapis-common-protos  1.51.0           py37h21ff451_2    anaconda
heapdict                  1.0.1                      py_0    conda-forge
icc_rt                    2019.0.0             h0cc432a_1
icu                       58.2                 ha925a31_3
idna                      2.9                        py_1
imagesize                 1.2.0                      py_0
impi_rt                   2019.8                intel_254    intel
importlib-metadata        1.6.1                    py37_0
importlib_metadata        1.6.1                         0
intel-openmp              2019.4                      245
intelpython               2020.2                        0    intel
intervaltree              3.0.2                      py_0
ipykernel                 5.3.0            py37h5ca1d4c_0
ipython                   7.15.0                   py37_0
ipython_genutils          0.2.0                    py37_0
ipywidgets                7.5.1                      py_0    conda-forge
isort                     4.3.21                   py37_0
jedi                      0.15.2                   py37_0
jellyfish                 0.7.2            py37h4ab8f01_1    conda-forge
jinja2                    2.11.2                     py_0
jinja2-time               0.2.0                      py_2    conda-forge
jmespath                  0.9.4                      py_0    anaconda
joblib                    0.15.1                     py_0
jpeg                      9b                   hb83a4c4_2
json5                     0.9.5                      py_0
jsonschema                3.2.0                    py37_0
jupyter                   1.0.0                    py37_7
jupyter_client            6.1.3                      py_0
jupyter_console           6.1.0                      py_0
jupyter_core              4.6.3                    py37_0
jupyterlab                2.2.2                      py_0    conda-forge
jupyterlab_server         1.1.5                      py_0
keyring                   21.1.1                   py37_2
kiwisolver                1.2.0            py37h74a9793_0
langdetect                1.0.7                      py_0    conda-forge
lazy-object-proxy         1.5.0            py37he774522_0
libpng                    1.6.37               h2a8f88b_0
libprotobuf               3.12.3               h7bd577a_0    anaconda
libsodium                 1.0.16               h9d3ae62_0
libspatialindex           1.9.3                h33f27b4_0
libtiff                   4.1.0                h56a325e_1
locket                    0.2.0                      py_2    conda-forge
lz4-c                     1.9.2                h62dcd97_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gmp                 6.1.0                         2
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
markupsafe                1.1.1            py37he774522_0
matplotlib                3.2.2                         0
matplotlib-base           3.2.2            py37h64f37c6_0
mccabe                    0.6.1                    py37_1
missingno                 0.4.2                    pypi_0    pypi
mistune                   0.8.4            py37he774522_0
mkl                       2019.4                      245    anaconda
mkl-service               2.3.0            py37hb782905_0    anaconda
mkl_fft                   1.1.0            py37h45dec08_0    anaconda
mkl_random                1.1.0            py37h675688f_0    anaconda
modin                     0.8.0                      py_0    conda-forge
msgpack-numpy             0.4.3.2                  py37_0
msgpack-python            0.6.1            py37h74a9793_1
msys2-conda-epoch         20160418                      1
murmurhash                1.0.2            py37h33f27b4_0
nbconvert                 5.6.1                    py37_0
nbformat                  5.0.7                      py_0
networkx                  2.4                        py_1    conda-forge
nltk                      3.5                        py_0
notebook                  6.0.3                    py37_0
numexpr                   2.7.1            py37h1834ac0_1    conda-forge
numpy                     1.18.5           py37h6530119_0    anaconda
numpy-base                1.18.5           py37hc3f5095_0    anaconda
numpydoc                  1.0.0                      py_0
olefile                   0.46                       py_0    conda-forge
openssl                   1.1.1g               he774522_1    conda-forge
packaging                 20.4                       py_0
pandas                    1.0.5            py37h47e9c7a_0
pandoc                    2.2.3.2                       0
pandocfilters             1.4.2                    py37_1
paramiko                  2.7.1                      py_0
parso                     0.5.2                      py_0
partd                     1.1.0                      py_0    conda-forge
pathtools                 0.1.2                      py_1
patsy                     0.5.1                      py_0    conda-forge
pdfminer.six              20200517                   py_1    conda-forge
pexpect                   4.8.0                    py37_0
pickle5                   0.0.11           py37h4ab8f01_0    conda-forge
pickleshare               0.7.5                    py37_0
pillow                    7.2.0            py37hcc1f983_0
pip                       20.1.1                   py37_1
plac                      0.9.6                    py37_0
plotly                    4.9.0                      py_0    plotly
pluggy                    0.13.1                   py37_0
poyo                      0.5.0                      py_0    conda-forge
preshed                   3.0.2            py37h1834ac0_3    conda-forge
progressbar               2.5                      pypi_0    pypi
progressbar2              3.51.4             pyh9f0ad1d_0    conda-forge
prometheus_client         0.8.0                      py_0
prompt-toolkit            3.0.5                      py_0
prompt_toolkit            3.0.5                         0
protobuf                  3.12.3           py37h33f27b4_0    anaconda
psutil                    5.7.0            py37he774522_0
pyasn1                    0.4.8                      py_0    anaconda
pyasn1-modules            0.2.7                      py_0    anaconda
pycodestyle               2.5.0                    py37_0
pycparser                 2.20                       py_0
pycryptodome              3.9.7            py37h8055547_1    conda-forge
pydocstyle                5.0.2                      py_0
pyemd                     0.5.1           py37h9b59f54_1001    conda-forge
pyflakes                  2.1.1                    py37_0
pygments                  2.6.1                      py_0
pyldavis                  2.1.2                      py_0    conda-forge
pylint                    2.4.4                    py37_0
pynacl                    1.3.0            py37h62dcd97_0
pyopenssl                 19.1.0                   py37_0
pyparsing                 2.4.7                      py_0
pyphen                    0.9.5                      py_0    conda-forge
pyqt                      5.9.2            py37h6538335_2
pyreadline                2.1                      py37_1
pyrsistent                0.16.0           py37he774522_0
pysocks                   1.7.1                    py37_0
python                    3.7.7                h81c818b_4
python-dateutil           2.8.1                      py_0
python-jsonrpc-server     0.3.4                      py_0
python-language-server    0.31.10                  py37_0
python-slugify            4.0.1              pyh9f0ad1d_0    conda-forge
python-utils              2.4.0                      py_0    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
pytz                      2020.1                     py_0
pywin32                   227              py37he774522_1
pywin32-ctypes            0.2.0                 py37_1000
pywinpty                  0.5.7                    py37_0
pyyaml                    5.3.1            py37he774522_0
pyzmq                     18.1.1           py37ha925a31_0
qdarkstyle                2.8.1                      py_0
qt                        5.9.7            vc14h73c81de_0
qtawesome                 0.7.2                      py_0
qtconsole                 4.7.5                      py_0
qtpy                      1.9.0                      py_0
regex                     2020.5.14        py37he774522_0
requests                  2.24.0                     py_0
retrying                  1.3.3                      py_2    conda-forge
rope                      0.17.0                     py_0
rsa                       4.0                        py_0    anaconda
rtree                     0.9.4            py37h21ff451_1
s3transfer                0.1.13                   py37_0    anaconda
scikit-learn              0.23.1           py37h6ebd63d_0    intel
scipy                     1.5.0            py37h9439919_0    anaconda
seaborn                   0.10.1                        1    conda-forge
seaborn-base              0.10.1                     py_1    conda-forge
selenium                  3.141.0          py37he774522_0
send2trash                1.5.0                    py37_0
setuptools                47.3.1                   py37_0
sip                       4.19.8           py37h6538335_0
six                       1.15.0                     py_0
smart_open                2.0.0                      py_0    anaconda
snowballstemmer           2.0.0                      py_0
sortedcontainers          2.2.2                      py_0
soupsieve                 2.0.1                      py_0
spacy                     2.3.2            py37h1fb7aa8_0    conda-forge
sphinx                    3.1.1                      py_0
sphinxcontrib-applehelp   1.0.2                      py_0
sphinxcontrib-devhelp     1.0.2                      py_0
sphinxcontrib-htmlhelp    1.0.3                      py_0
sphinxcontrib-jsmath      1.0.1                      py_0
sphinxcontrib-qthelp      1.0.3                      py_0
sphinxcontrib-serializinghtml 1.1.4                      py_0
spyder                    4.1.3                    py37_0
spyder-kernels            1.9.1                    py37_0
sqlite                    3.32.3               h2a8f88b_0
srsly                     1.0.2            py37h1834ac0_0    conda-forge
statsmodels               0.11.1           py37h4ab8f01_2    conda-forge
tbb                       2020.0               h74a9793_0
tbb4py                    2020.0           py37h74a9793_0
tblib                     1.6.0                      py_0    conda-forge
terminado                 0.8.3                    py37_0
testpath                  0.4.4                      py_0
text-unidecode            1.3                        py_0    conda-forge
textacy                   0.10.0           py37hc8dfbb8_0    conda-forge
thinc                     7.4.1            py37h1fb7aa8_0    conda-forge
tk                        8.6.10               hfa6e2cd_0    conda-forge
toolz                     0.10.0                     py_0
tornado                   6.0.4            py37he774522_1
tqdm                      4.46.1                     py_0
traitlets                 4.3.3                    py37_0
typing_extensions         3.7.4.2                    py_0    conda-forge
ujson                     1.35             py37hfa6e2cd_0
unidecode                 1.1.1                      py_0    conda-forge
urllib3                   1.25.9                     py_0
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_2
wasabi                    0.7.1              pyh9f0ad1d_0    conda-forge
watchdog                  0.10.2                   py37_0
wcwidth                   0.2.4                      py_0
webdriver-manager         3.2.1                    pypi_0    pypi
webencodings              0.5.1                    py37_1
wheel                     0.34.2                   py37_0
whichcraft                0.6.1                      py_0    conda-forge
widgetsnbextension        3.5.1                    py37_0
win_inet_pton             1.1.0                    py37_0
wincertstore              0.2                      py37_0
winpty                    0.4.3                         4
wrapt                     1.10.11          py37hfa6e2cd_2
xlrd                      1.2.0              pyh9f0ad1d_1    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.1.7                hc54c509_2
yapf                      0.29.0                     py_0
zeromq                    4.3.1                h33f27b4_3
zict                      2.0.0                      py_0    conda-forge
zipp                      3.1.0                      py_0
zlib                      1.2.11               h62dcd97_4
zstd                      1.4.5                h1f3a1b7_2    cond
bdewilde commented 4 years ago

Hi @aliforgetti , I think this is a spaCy issue and not a textacy issue, but I'm not sure. There seems to be a related open issue for neuralcoref, here: https://github.com/huggingface/neuralcoref/issues/197. Looks like you may want to try installing from source?

Does this happen if you install spacy 2.3.0+ and textacy 0.10+ into a fresh env?