Comments (9)
I created a new python 3.6 virtual environment with conda and tried installing
spacy with conda from scratch:
$ conda create -n spacy python=3.6 anaconda
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /Users/davidlaxer/anaconda/envs/spacy:
The following NEW packages will be INSTALLED:
anaconda: custom-py36ha4fed55_0
ca-certificates: 2017.11.5-0 conda-forge
certifi: 2017.11.5-py36_0 conda-forge
ncurses: 5.9-10 conda-forge
openssl: 1.0.2n-0 conda-forge
pip: 9.0.1-py36_0 conda-forge
python: 3.6.4-0 conda-forge
readline: 7.0-0 conda-forge
setuptools: 38.2.4-py36_0 conda-forge
sqlite: 3.20.1-2 conda-forge
tk: 8.6.7-0 conda-forge
wheel: 0.30.0-py_1 conda-forge
xz: 5.2.3-0 conda-forge
zlib: 1.2.11-0 conda-forge
Proceed ([y]/n)? y
sqlite-3.20.1- 100% |################################| Time: 0:00:02 664.49 kB/s
python-3.6.4-0 100% |################################| Time: 0:00:04 2.59 MB/s
anaconda-custo 100% |################################| Time: 0:00:00 3.88 MB/s
#
# To activate this environment, use:
# > source activate spacy
#
# To deactivate an active environment, use:
# > source deactivate
#
David-Laxers-MacBook-Pro:~ davidlaxer$ source activate spacy
(spacy) David-Laxers-MacBook-Pro:~ davidlaxer$ conda install ipython
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /Users/davidlaxer/anaconda/envs/spacy:
The following NEW packages will be INSTALLED:
appnope: 0.1.0-py36_0 conda-forge
decorator: 4.1.2-py36_0 conda-forge
ipython: 6.2.1-py36_0 conda-forge
ipython_genutils: 0.2.0-py36_0 conda-forge
jedi: 0.10.2-py36_0 conda-forge
pexpect: 4.3.1-py36_0 conda-forge
pickleshare: 0.7.4-py36_0 conda-forge
prompt_toolkit: 1.0.15-py36_0 conda-forge
ptyprocess: 0.5.2-py36_0 conda-forge
pygments: 2.2.0-py36_0 conda-forge
simplegeneric: 0.8.1-py36_0 conda-forge
six: 1.11.0-py36_1 conda-forge
traitlets: 4.3.2-py36_0 conda-forge
wcwidth: 0.1.7-py36_0 conda-forge
Proceed ([y]/n)? y
(spacy) David-Laxers-MacBook-Pro:~ davidlaxer$ conda install spacy
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /Users/davidlaxer/anaconda/envs/spacy:
The following NEW packages will be INSTALLED:
asn1crypto: 0.22.0-py36_0 conda-forge
cffi: 1.11.2-py36_0 conda-forge
chardet: 3.0.4-py36_0 conda-forge
cryptography: 2.1.4-py36_0 conda-forge
cymem: 1.31.2-py36_0 conda-forge
cytoolz: 0.8.2-py36_0 conda-forge
dill: 0.2.6-py36_0 conda-forge
ftfy: 4.4.2-py36_0 conda-forge
html5lib: 1.0.1-py_0 conda-forge
idna: 2.6-py36_1 conda-forge
intel-openmp: 2018.0.0-h8158457_8
libffi: 3.2.1-3 conda-forge
libgfortran: 3.0.1-h93005f0_2
mkl: 2018.0.1-hfbd8650_4
msgpack-numpy: 0.4.1-py_0 conda-forge
msgpack-python: 0.4.8-py36_0 conda-forge
murmurhash: 0.28.0-py36_0
numpy: 1.13.3-py36h2cdce51_0
plac: 0.9.6-py36_0 conda-forge
preshed: 1.0.0-py36_0 conda-forge
pycparser: 2.18-py36_0 conda-forge
pyopenssl: 17.4.0-py36_0 conda-forge
pysocks: 1.6.7-py36_0 conda-forge
regex: 2017.11.09-py36_0 conda-forge
requests: 2.18.4-py36_1 conda-forge
spacy: 2.0.4-py36_0 conda-forge
termcolor: 1.1.0-py36_1 conda-forge
thinc: 6.10.0-py36_0 conda-forge
toolz: 0.8.2-py_2 conda-forge
tqdm: 4.19.5-py_0 conda-forge
ujson: 1.35-py36_0 conda-forge
urllib3: 1.22-py36_0 conda-forge
webencodings: 0.5-py36_0 conda-forge
wrapt: 1.10.11-py36_0 conda-forge
Proceed ([y]/n)? y
tqdm-4.19.5-py 100% |################################| Time: 0:00:00 173.60 kB/s
(spacy) David-Laxers-MacBook-Pro:~ davidlaxer$ python -m spacy.en.download
Traceback (most recent call last):
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/spacy/__init__.py", line 4, in <module>
from .cli.info import info as cli_info
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/spacy/cli/__init__.py", line 1, in <module>
from .download import download
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/spacy/cli/download.py", line 10, in <module>
from .link import link
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/spacy/cli/link.py", line 7, in <module>
from ..compat import symlink_to, path2str
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/spacy/compat.py", line 11, in <module>
from thinc.neural.util import copy_array
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/thinc/neural/__init__.py", line 1, in <module>
from ._classes.model import Model
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 12, in <module>
from ..train import Trainer
File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/thinc/neural/train.py", line 3, in <module>
from .optimizers import Adam, SGD, linear_decay
File "optimizers.pyx", line 13, in init thinc.neural.optimizers
File "ops.pyx", line 1, in init thinc.neural.ops
ImportError: murmurhash.mrmr does not export expected C function hash128_x86
from thinc.
I have encountered this same exact error. This only comes up on OS X. Doing a conda install
of spacy=2
on linux (specifically ubuntu 16.04.*) is fine.
Interestingly enough, this error does not come up when building spacy
from sources on OS X.
I can confirm that:
- Doing
conda install -c conda-forge spacy=2.0.7
(then doingimport spacy
) on OS X will reproduce this error. - This same action on Linux will not produce this error.
- This error does not occur on OS X if one does a
pip install spacy==2.0.7
.
My conclusion here is that I think that the spacy 2.0.7
package was incorrectly built and uploaded to conda-forge
for OS X.
from thinc.
I solved the problem by updating Spyder.
from thinc.
I tried removing the conda and pip installations of spaCy:
$ conda list spacy
# packages in environment at /Users/davidlaxer/anaconda:
#
Then installed 'spaCy' from github:
$ python setup.py install
...
Using /Users/davidlaxer/anaconda/envs/py36/lib/python3.6/site-packages
Finished processing dependencies for spacy==2.0.5
Also, 'thinc' built with 'fab' and runs properly. I can run tests in 'thinc':
$ fab eg.mnist
[localhost] local: python examples/mnist_mlp.py
Downloading data from https://s3.amazonaws.com/img-datasets/mnist.pkl.gz
66.7266729019 0.960333333333 0.3
25.7787869463 0.970833333333 0.3
18.8024897413 0.975333333333 0.3
15.2940811263 0.978666666667 0.3
12.6868923288 0.979666666667 0.3
10.907709888 0.979 0.3
9.90145768215 0.980166666667 0.3
9.58847966164 0.979166666667 0.3
8.16073693893 0.980666666667 0.3
7.54027050765 0.981 0.3
7.05141087245 0.981333333333 0.3
6.45005679891 0.981166666667 0.3
5.91079736613 0.982666666667 0.3
5.49958813231 0.9835 0.3
5.22847711169 0.983666666667 0.3
4.99858748966 0.982833333333 0.3
5.0555315372 0.983666666667 0.3
4.69916855313 0.983166666667 0.3
4.59268881318 0.983166666667 0.3
4.06976232603 0.982166666667 0.3
4.05801555403 0.981666666667 0.3
3.6813617148 0.982 0.3
4.0125010367 0.983 0.3
3.54586118958 0.983333333333 0.3
3.98345562823 0.984 0.3
3.36111325719 0.983333333333 0.3
3.24403010104 0.984666666667 0.3
3.38848171842 0.9845 0.3
3.43550620693 0.984 0.3
3.28882536707 0.983833333333 0.3
Avg dev.: 0.984
Done.
I can access thinc.neural.util from the 'thinc' directory
E.g. /Users/davidlaxer/thinc.
$ ipython
Python 3.6.3 | packaged by conda-forge | (default, Dec 9 2017, 16:20:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import thinc
In [2]: import thinc.neural
In [3]: import thinc.neural.util
In [4]: quit()
but not from spacy.
$ ipython
Python 3.6.3 | packaged by conda-forge | (default, Dec 9 2017, 16:20:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [2]: import thinc
In [3]: import thinc.neural
In [4]: import thinc.neural.util
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-bc0441cb1081> in <module>()
----> 1 import thinc.neural.util
ModuleNotFoundError: No module named 'thinc.neural.util'
In [5]: quit
from thinc.
from thinc.
@malcolmgreaves Is this fixed for spaCy v2.0.8 and v2.0.9?
from thinc.
@honnibal I have spaCy v2.0.11 and facing the same problem only when using Python interpreter while the error doesn't appear when used in iPython interpreter. So, I guess not.
@malcolmgreaves any idea how to solve this? Is it by downgrading to an older version?
Thanks in advance,
from thinc.
Still having issue:
Traceback (most recent call last):
File "/Users/davidlaxer/Lda2vec-Tensorflow/lda2vec/nlppipe.py", line 3, in <module>
import spacy
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/spacy/__init__.py", line 4, in <module>
from .cli.info import info as cli_info
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/spacy/cli/__init__.py", line 1, in <module>
from .download import download
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/spacy/cli/download.py", line 10, in <module>
from .link import link
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/spacy/cli/link.py", line 8, in <module>
from ..compat import symlink_to, path2str
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/spacy/compat.py", line 9, in <module>
from thinc.neural.util import copy_array
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/thinc/neural/__init__.py", line 1, in <module>
from ._classes.model import Model
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 12, in <module>
from ..train import Trainer
File "/Users/davidlaxer/anaconda/envs/spacy/bin/python-3.6/lib/python3.6/site-packages/thinc/neural/train.py", line 3, in <module>
from .optimizers import Adam, SGD, linear_decay
File "optimizers.pyx", line 13, in init thinc.neural.optimizers
File "ops.pyx", line 1, in init thinc.neural.ops
ImportError: murmurhash.mrmr does not export expected C function hash128_x86
Process finished with exit code 1
from thinc.
I have the latest version of Spacy on Mac and tried to compile spacy from source. The compiling is fine, but can't import:
ipython
Python 3.8.3 (default, Jul 2 2020, 11:26:31)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import spacy
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-76a01d9c502b> in <module>
----> 1 import spacy
~/anaconda3/test/spacy/spaCy/spacy/__init__.py in <module>
8
9 # These are imported as part of the API
---> 10 from thinc.neural.util import prefer_gpu, require_gpu
11
12 from . import pipeline
ModuleNotFoundError: No module named 'thinc'
I can do everything right without using conda.
from thinc.
Related Issues (20)
- Register `thinc.api.fix_random_seed` as a pytest-randomly entry point
- `floats_getitem` and `ints_getitem` missing from `thinc.api`
- Documentation of Model.from_disk HOT 1
- `SparseLinear` does not look up weights correctly
- Improving type definitions for forward/backward in models
- Segfault possibly caused by changes to `MaxOut` in v8.1.1 HOT 11
- Wrong entry-point fix_random_seed
- Type checkers don't like non-literal `__all__` in `thinc.api` for exposing the public interface HOT 2
- Allow Pydantic >= 1.10 HOT 2
- Is there a way to check if `prefer_gpu` has been called? HOT 1
- Tracking issue for Apple M-series GPU support
- llvm error out of memory HOT 1
- 'GLIBC_2.29' not found HOT 2
- Is there anyway to load a variable in a config file as a list? HOT 3
- Is there anyway to add multiline strings in a config file? HOT 1
- `reduce_mean` with zero-length sequence fails on NumPy backend HOT 2
- Tensorflow dependency slows spacy down HOT 2
- NumPy asarray op does not respect dtype for lists HOT 1
- Documentation of Loss.get_grad confusingly describes independent variable HOT 1
- core dump on powerpc64le HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thinc.