ModuleNotFoundError: No module named 'indexer' - spell-checking

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from spellchecker import SpellChecker
2
3 spell = SpellChecker()
4 def correct_spellings(text):
5 corrected_text = []
1 frames
/usr/local/lib/python3.7/dist-packages/spellchecker/core.py in ()
24 import urllib
25
---> 26 from indexer import DictionaryIndex
27 from langdetect import _detect_lang
28
ModuleNotFoundError: No module named 'indexer'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.enter code here

You might have used this to install pip install spellchecker, install using pip install pyspellchecker.

Related

Error when "import tensorflow as tf" in colab

When I "import tensorflow as tf" in google colab I am getting the following error. Any idea how to fix it ?
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-37-07e0f991eb97> in <module>()
----> 1 import tensorflow as tf
2
3 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/client/pywrap_tf_session.py in <module>()
17 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
18 from tensorflow.python import pywrap_tensorflow
---> 19 from tensorflow.python.client._pywrap_tf_session import *
20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget
21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig
ImportError: SystemError: <built-in method __contains__ of dict object at 0x7f79368db0a0> returned a result with an error set
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
This issue has been fixed now in 2.8.0 stable version. If it still persists ,please install Numpy 1.21.5 manually and Try again.
I've post a similar error on tensorflow github issue.
Tensorflow 2.8.0 | Error Message: ImportError: SystemError.
My solution (since I'm using conda environment on Windows 10), is to downgrade the Tensorflow version to 2.7.0. Hope help helps.

Dropbox ModuleNotFoundError: No module named 'stone'

Im trying to import Dropbox with the line:
import dropbox
on Google Colab but im getting the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-26-fac67f6fa745> in <module>()
28 import math
29 import io
---> 30 import dropbox
31 from keras.models import Sequential
32 from keras.layers import Dense
2 frames
/usr/local/lib/python3.6/dist-packages/dropbox/auth.py in <module>()
5 # pylint: skip-file
6 from __future__ import unicode_literals
----> 7 from stone.backends.python_rsrc import stone_base as bb
8 from stone.backends.python_rsrc import stone_validators as bv
9
ModuleNotFoundError: No module named 'stone'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
It was working perfectly normal a day ago
The problem is that a new release of Dropbox API was out today and it has that glitch. Just used the version before today by using
pip install dropbox==10.10.0

pip install PyRQA in Google colab

Hope someone can help me, when I try to install and run PyRQA in colab in the GPU runtime and after run the next code:
pip install PyRQA
from pyrqa.time_series import TimeSeries
from pyrqa.settings import Settings
from pyrqa.analysis_type import Classic
from pyrqa.neighbourhood import FixedRadius
from pyrqa.metric import EuclideanMetric
from pyrqa.computation import RQAComputation
from pyrqa.computation import RPComputation
from pyrqa.image_generator import ImageGenerator
give me the next error.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-6c56a517e983> in <module>()
4 from pyrqa.neighbourhood import FixedRadius
5 from pyrqa.metric import EuclideanMetric
----> 6 from pyrqa.computation import RQAComputation
7 from pyrqa.computation import RPComputation
8 from pyrqa.image_generator import ImageGenerator
6 frames
/usr/local/lib/python3.6/dist-packages/pyopencl/tools.py in <module>()
35 from decorator import decorator
36 from pytools import memoize, memoize_method
---> 37 from pyopencl._cl import bitlog2 # noqa: F401
38 from pytools.persistent_dict import KeyBuilder as KeyBuilderBase
39
ImportError: /usr/lib64-nvidia/libOpenCL.so.1: version `OPENCL_2.1' not found (required by /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so)
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
Some days ago it works fine, but after yesterday it doesn't work anymore

ImportError: No module named 'twisted.persisted'

I haved install scrapy on Python 3.5.2, but when I exeute scrapy -v on command-line, it occurs:
>> scrapy -v
Traceback (most recent call last):
File "/usr/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/__init__.py", line 27, in <module>
from . import _monkeypatches
File "/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/_monkeypatches.py", line 20, in <module>
import twisted.persisted.styles # NOQA
ImportError: No module named 'twisted.persisted'
So I enter ipython3 to ensure whether it's installed porperly:
In [2]: import twisted
In [3]: twisted.version
Out[3]: Version('twisted', 15, 2, 1)
But when I import scrapy, the same as command-line:
In [4]: import scrapy
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-51c73a18167b> in <module>()
----> 1 import scrapy
/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/__init__.py in <module>()
25
26 # Apply monkey patches to fix issues in external libraries
---> 27 from . import _monkeypatches
28 del _monkeypatches
29
/usr/local/python3.5.2/lib/python3.5/site-packages/scrapy/_monkeypatches.py in <module>()
18 # Undo what Twisted's perspective broker adds to pickle register
19 # to prevent bugs like Twisted#7989 while serializing requests
---> 20 import twisted.persisted.styles # NOQA
21 # Remove only entries with twisted serializers for non-twisted types.
22 for k, v in frozenset(copyreg.dispatch_table.items()):
ImportError: No module named 'twisted.persisted'
I'm so confused, I just want to run a spaider, So help me !
Your Twisted version is outdated, if you look at requirements-py3.txt file:
Twisted >= 15.5.0
lxml>=3.2.4
pyOpenSSL>=0.13.1
cssselect>=0.9
queuelib>=1.1.1
w3lib>=1.17.0
service_identity
Where your's is, 15.2.
Currently the latest version 17.1.0 and there are no downsides of running it; Try:
pip3 install twisted --upgrade

Timedelta error; version 0.15.1-=np19py27_0

This problem was asked at:
pandas Timedelta error
However, the solution (to get the latest version of pandas) did not work for me.
I've got the same problem (installed using anaconda, on Windows 7), and trying to do this gets the same problem.
Running from ipython:
In [1]: import pandas as pd
-----------------------------------------
ImportError
<ipython-input-1-af55e7023913> in <module
----> 1 import pandas as pd
C:\Anaconda\lib\site-packages\pandas\__in
45
46 # let init-time option registrati
---> 47 import pandas.core.config_init
48
49 from pandas.core.api import *
C:\Anaconda\lib\site-packages\pandas\core
15 i
16 g
---> 17 from pandas.core.format import de
18
19
C:\Anaconda\lib\site-packages\pandas\core
7 from pandas.core.base import Pand
8 from pandas.core.common import ad
----> 9 from pandas.core.index import Ind
10 from pandas import compat
11 from pandas.compat import(StringI
C:\Anaconda\lib\site-packages\pandas\core
13 import pandas.algos as _algos
14 import pandas.index as _index
---> 15 from pandas.lib import Timestamp,
16 from pandas.core.base import Pand
17 from pandas.util.decorators impor
ImportError: cannot import name Timedelta
I've checked the pandas version, it is 0.15.1-np19py27_0.
nosetests pandas also returns problems:
PS R:\data\python_testing\ipython_notebooks> nosetests pandas
E
======================================================================
ERROR: Failure: ImportError (cannot import name Timedelta)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\nose\loader.py", line 403, in loadTestsFromName
module = resolve_name(addr.module)
File "C:\Anaconda\lib\site-packages\nose\util.py", line 311, in resolve_name
module = __import__('.'.join(parts_copy))
File "C:\Anaconda\lib\site-packages\pandas\__init__.py", line 47, in <module>
import pandas.core.config_init
File "C:\Anaconda\lib\site-packages\pandas\core\config_init.py", line 17, in <module>
from pandas.core.format import detect_console_encoding
File "C:\Anaconda\lib\site-packages\pandas\core\format.py", line 9, in <module>
from pandas.core.index import Index, MultiIndex, _ensure_index
File "C:\Anaconda\lib\site-packages\pandas\core\index.py", line 15, in <module>
from pandas.lib import Timestamp, Timedelta, is_datetime_array
ImportError: cannot import name Timedelta
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
This issue is discussed at github:
https://github.com/pydata/pandas/issues/8862
I had this problem recently, and it turned out to be because I had recently used conda to install some packages from the command prompt, but had forgetten to launch the command prompt as administrator.
In my case I was able to fix the problem by launching command prompt as administrator, and reinstalling the packages concerned with "conda install -f ".
In your case you could try "conda install -f pandas".
It is possible you might have this problem with more than one package.
i'm pretty sure this issue occurs on Windows due to file open issues. Because a process is holding the file handler to one of the packages files the upgrade fails. Kill all Python and Excel processes and try again.