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.
Related
I'm using a Python library (pyPyrTools), which is giving me an import error.
../../../venv/lib/python3.8/site-packages/pyPyrTools/__init__.py:1: in <module>
from binomialFilter import binomialFilter
E ModuleNotFoundError: No module named 'binomialFilter'
Inspecting the module in venv/lib/site-packages, I find the following structure:
-pyPyrTools
---__init__.py
---binomialFilter.py
And inspecting __init__.py, it's a pretty standard fare import:
from binomialFilter import binomialFilter
binomialFilter.py does include a function called binomialFilter.
Any idea why I'm getting this error from this library? There aren't any relative imports or anything funky, and the files all exist on the right level. It all looks correct to me.
The module looks like it was written for 2.7, and I'm using 3.8 if that is relevant.
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
I have this library in my code:
from pyrouge.utils import log
But I am getting the following error:
ModuleNotFoundError: No module named 'pyrouge.utils';
'pyrouge' is not a package
Though pyrouge in already installed in my system. I tried to find its solution but there are like none results. Can anyone help me here?
I've downloaded pymumble from https://github.com/Robert904/pymumble and saved it to my working directory. I import it with:
from pymumble import pymumble
However, I receive:
ImportError: No module named pymumble
I'm looking at similar code that does this successfully. What am I doing wrong when trying to import this?
As I can see there is no file called pymumble in given repository, if you are looking for this there is a file called mumble.py, try importing
from mumble import mumble
this will work.
Running an exe compiled in py2exe is now giving me this error:
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import display: No module named _view
(ImportError: No module named _view)
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import draw: No module named _view
(ImportError: No module named _view)
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import image: No module named _view
(ImportError: No module named _view)
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import pixelcopy: No module named _view
(ImportError: No module named _view)
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import transform: No module named _view
(ImportError: No module named _view)
I did not modify my py2exe file since the last working build, nor have I made any significant changes to my Python installation. I have modified code, which must be causing this issue, but the error message is giving me no information on how to fix it. What could cause this issue?
I have put import pygame._view at the top of my main.py script and it is not helping. I do not reference any system fonts, all fonts used in my code are .ttf files in my package.
EDIT: Searched more. import re is not working either.
The solution is to add import pygame._view to the top of your main source file. Any of the packagers should work after that.
Try to do so. Some similar question was already asked in the past.
Please check also Pygame to exe display module error [duplicate]
and
Opening an EXE of my Pygame program gives me import errors
IF you look at the second answer the problem was in the "font" usage. Maybe you did something similar :-) Try it out and let us know.
Unfortunately I am not personally using pygame module :-( but I guess for the defined _view you have to use the import as you did correctly :-)
Hope this solve your query :-) Have a nice day.
This is looking like a PYTHONPATH issue. You need to verify that all of the locations where these modules are located are either in the development directory itself or in your search path for Python.
You can do a:
print sys.path
to see what is in your search path and validate those modules are in it. It is possible something changed it. Once you verify that, you can add the missing paths using PYTHONPATH.