TextBlob icon indicating copy to clipboard operation
TextBlob copied to clipboard

Error loading textblob

Open karnauskas opened this issue 3 years ago • 1 comments

For some reason this is happening on BigSur while importing textblob:

% python3 -m textblob 
Python(22068,0x1185b2e00) malloc: can't allocate region
:*** mach_vm_map(size=18446744071598305280, flags: 100) failed (error code=3)
Python(22068,0x1185b2e00) malloc: *** set a breakpoint in malloc_error_break to debug
init_dgelsd failed init
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 184, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 143, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/textblob/__init__.py", line 2, in <module>
    from .blob import TextBlob, Word, Sentence, Blobber, WordList
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/textblob/blob.py", line 28, in <module>
    import nltk
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/nltk/__init__.py", line 128, in <module>
    from nltk.collocations import *
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/nltk/collocations.py", line 39, in <module>
    from nltk.metrics import (
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/nltk/metrics/__init__.py", line 37, in <module>
    from nltk.metrics.segmentation import windowdiff, ghd, pk
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/nltk/metrics/segmentation.py", line 44, in <module>
    import numpy as np
  File "/Users/nkts/Library/Python/3.8/lib/python/site-packages/numpy/__init__.py", line 286, in <module>
    raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
% pip3 list -v |grep textblob
textblob          0.15.3     /Users/nkts/Library/Python/3.8/lib/python/site-packages                                                                  pip

karnauskas avatar Nov 24 '20 14:11 karnauskas

I think this is related to https://github.com/numpy/numpy/issues/17784

karnauskas avatar Nov 24 '20 15:11 karnauskas