I want to start up a project, which imports a module named kzyvad. It occurs error ImportError: No module named 'kzyvad'. However, if I execute pip install kzyvad, it returns ERROR: Could not find a version that satisfies the requirement kzyvad.
Did someone ever successfully install kzyvad?
I don't know where you found your module but I looked for it and I could not find it, I think the guy who wrote 'kzyvad' did a mistake while writing, and if pip gives you this error, it means it doesn't exist.
If this kzyvad.py is written by you, then keep this file/module in a same folder and do this in main.py file:
from kzyvad import *
You can use it's functions and classes in your main.py file
Related
For my lambda function I need this library: https://github.com/explosion/tokenizations (Listed under pytokenizations on PyPi)
I've installed it with pip install --target ./package , zipped it and brought it to lambda, but when I run my function (the exact same code works fine on my machine) I get the following error: "Unable to import module 'main': No module named 'tokenizations'"
EDIT: The actual error is "Unable to import module 'main': No module named 'tokenizations.tokenizations'" Wouldn't the normal output be just one time tokenizations?
The other module I'm using through the /package folder is working just fine.
What could be possible causes for this?
I am trying to execute this example using Python 3.7 with Pycharm and azure-eventhub 1.2.0 package.
When I try to run it, I get this error:
ModuleNotFoundError: No module named 'azure.eventhub'; 'azure' is not a package
This is the problematic line:
from azure.eventhub import EventHubClient, Receiver, Offset
What could be happening?
This is my project interpreter
Using pip freeze:
As I known, there is a case which will cause your issue.
The Python Interpreter searches the available packages, objects and methods in the paths of sys.path in order, you can print the value of the sys.path variable to see the order after import sys.
So if there is a Python script named azure.py prior to the real azure package, you will get the issue ModuleNotFoundError: No module named 'azure.eventhub'; 'azure' is not a package.
Here is my steps to reproduce this issue.
I created a Python script named azure.py in the current path which only have one line code print('pseudo azure package').
Then, I opened my Python interpreter in the current path and type from azure.eventhub import EventHubClient, Receiver, Offset, then to get the issue as below.
It also will happen in Pycharm, even using virtualenv, please check whether exists a file called azure.py or azure.pyc in your current path or the paths in the order of sys.path list.
Getting the following error when trying to import a lib that depends on zope
No module named zope.index
my python path is correct (I can import other libs)
I already created an init.py file in the zope folder but it still isnt working so Im not sure what I might be missing
currently using python 3.7
*edit
Error:
File "C:\Users\vitor.valentim\AppData\Local\Programs\Python\Python37\Lib\dedupe\tfidf.py", line 5, in
from .canopy_index import CanopyIndex
File "C:\Users\vitor.valentim\AppData\Local\Programs\Python\Python37\Lib\dedupe\canopy_index.py", line 3, in
from zope.index.text.lexicon import Lexicon
ModuleNotFoundError: No module named 'zope.index'
zope path
zope.index path
The error message No module named zope.index implies that import found a package zope, but then failed to find zope.index (otherwise the error message would be No module named zope).
Try
import zope
print(zope)
and see what that resolves to, something like this often happens if there is something shadowing the package you're trying to import.
I'm using Python 3.3.5 with cx-freeze 4.3.3 on windows 8.1.
I'm trying to cx_freeze a program that uses pkg_resources.
I initially had it in my setup file under packages, but when I tried to freeze it the processes stopped with an error Import Error: No module named 'pkg_resources'.
I then moved it in the setup file from packages to includes. The cx_freeze process completed this time but when I tried to start the application I got another error message.
If I go to my IDE and try to import pkg_resources it works fine.
>>> import pkg_resources
>>> pkg_resources
<module 'pkg_resources' from 'C:\\Python33\\lib\\site-packages\\setuptools-18.0.1-py3.3.egg\\pkg_resources\\__init__.py'>
There's a similar question asked here, and the solution is to re-install setuptools. So I downloaded setuptools 18.0.1 and installed it via cmd, but it did not solve my problem and I'm still getting the same errors with cx_freeze.
Any help getting this to work would be greatly appreciated.
Edit: My solution (hack) has been to write the dependency out of yagmail. Yagmail's original _innit__.py...
from pkg_resources import get_distribution
__project__ = 'yagmail'
__version__ = get_distribution(__project__).version
I first put a print statement in there to get the version, and then hard coded it.
__project__ = 'yagmail'
__version__ = '0.4.84'
Though this has solved my problem it isn't really the answer, so will leave this open should someone have a solution that keeps pkg_resources.
I need to import the multiprocessing module in Python 2.5.
I've followed the instructions here exactly: http://code.google.com/p/python-multiprocessing/wiki/Install
make and make test run without errors. I've also edited $PYTHONPATH to include the directory where the package is installed.
But 'import multiprocessing' still says: "ImportError: no module named multiprocessing".
What am I doing wrong? Is there some step missing from these instructions? I haven't installed a Python module before.
Navigate to the directory containing the package then type:
python setup.py install
This info was contained in the INSTALL.txt file.
http://code.google.com/p/python-multiprocessing/source/browse/trunk/INSTALL.txt
perhaps you can try:
import sys
sys.path.append('/path/to/processingdotpylibs/')
import processing