No module named 'polyglot.text'; 'polyglot' is not a package - python

I am new in python and I am trying to import polyglot module in my code. I have installed polyglot explained in Polyglot Installation, everything went good but it still gives me the same error.
ModuleNotFoundError: No module named 'polyglot.text'; 'polyglot' is not a package
When I checked polyglot in my drive, it has been installed inside directory
D:\Anaconda\Lib\site-packages\polyglot-16.7.4-py3.7.egg\polyglot
which has all the needed function in my code.
I need to know where is the problem? and I need to solve it!
I need to import the following functions:
from polyglot.transliteration import Transliterator
from polyglot.mapping import Embedding
from polyglot.load import load_embeddings

Try installing:
pip install polyglot numpy morfessor pycld2 pyicu

Related

ModuleNotFoundError: No module named 'pycoin'

Code:
from pycoin.ecdsa.secp256k1 import secp256k1_generator
When I run this, I get the error:
ModuleNotFoundError: No module named 'pycoin'
I've tried doing:
pip3 install pycoin
aswell as
pip install pycoin
Both of which have lead to the same error.
I've ran the code on python and python3 which also leads to the same error.
Any solutions?
Go to terminal or cmd on windows and type python3 (python2, python for older versions)
Then try to import the module there.
If the module in imported successfully then reopen your IDE. and then try.

No module named 'bcolors' although 'Requirement already satisfied'

I am trying to use bcolors in my python code in Spyder/Anaconda but it keeps telling me
ModuleNotFoundError: No module named 'bcolors'.
So I installed it with pip install bcolorswhich gave me Requirement already satisfied: bcolors in e:\anaconda3\lib\site-packages (1.0.4), but it still doesn't work.
What am I doing wrong?
You had that error because you are in different interpreter trying to import the module. You should append the path of the module to your working directory.
import sys
sys.path.append("\anaconda3\lib\site-packages")
import bcolors
Try to install lower version of this module
pip install bcolors==1.0.2
Have you tried installing the pandas' library using pip install pandas
I was having trouble with the latest distribution as well. Installing 1.0.2 worked for me.

ModuleNotFoundError: No module named 'fiftyone.zoo';

'import fiftyone'
import fiftyone as fo
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)
i tried to install zoo and fiftyone.zoo and install just fiftyone and i upgrade pip and i install it from pycharm interpreter but it gave me the same error massage
Just to clarify, you can install FiftyOne and all subpackages like so:
pip install fiftyone
The install docs have some troubleshooting tips if there is actually an install issue.
However, I suspect you have a folder named fiftyone/ or script named fiftyone.py in your current working directory. This would confuse Python and cause the wrong thing to be imported when you import fiftyone.
Try deleting those or moving to a different directory. Then import fiftyone.zoo should work.

can not import pascalize, depascalize from humps package python

Hello my friends plz help me with this strange problem
1-In my terminal of linux mint I can easily install package humps and then use from humps import pascalize, depascalize with no problem
2-But when I create a virtualenv of pythonand I can install package humps and I can use import humps but I can't use from humps import pascalize, depascalize or humps.pascalize("some_string")
it will cause an ImportError: cannot import name 'pascalize' and AttributeError: module 'humps' has no attribute 'pascalize'
It's likely that you typed pip install humps instead of pip install pyhumps.
Or add in your requirements file:
pyhumps==3.7.1
Pypi - pyhumps
Documentation - humps

No module named 'bankdate'(How to import just .py??)

Sorry that I have no idea how to describe this situation. The bigger package I like to install is "finance" (http://pydoc.net/finance/0.2502/finance.bankdate/). I downloaded it and unzipped to install using python setup.py install.
However, I cannot resolve importing another sub-module
bankdate(.py)
When I use finance module, there comes the error message, "ImportError: No module named 'bankdate'.(It is required in "__init__.py" under finance.) bankdate.py seems to be file under finance folder. How could I install "bankdate"?? Does anybody help me with this??
Thank you~!
cf) pip install bankdate, easy_install bankdate don't work in this case.
I do not know if you are working with Linux or Windows. But it would be a good start checking if the package was installed properly. You could use the following code to check installed packages and its versions:
import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
for i in installed_packages])
print(installed_packages_list)
By doing so packages installed using both setuptools and pip will appear in a list below. If your package does not appear in the list there you have, it was not installed.
Neverhteless try to import the module usign this:
from finance import bankdate
And see if the error continue. Hope it helps.
you can use pip install finance or you can download .whl file use pip intsall .whl
you can try

Categories

Resources