ModuleNotFoundError: No module named 'util' - python

I had an Import err that says "No module named util", but i cant find any package named util.
what path should I append in?
Code from LSTNet tensorflow by fabdline.
https://github.com/fbadine/LSTNet
# Path appended in order to import from util
import sys
#sys.path.append("..")
sys.path.append('../') #?what path should I Append?
import os
from util.model_util import LoadModel, SaveModel, SaveResults, SaveHistory
from util.Msglog import LogInit
Traceback (most recent call last): File "main.py", line 19, in
from util.model_util import LoadModel, SaveModel, SaveResults, SaveHistory ModuleNotFoundError: No module named 'util'

Follow the install instructions from the link you posted.
Under Installation it's stated:
Clone this prerequisite repository:
git clone https://github.com/fbadine/util.git
All the files you need can be found at https://github.com/fbadine/util

Related

No module named 'win32.com', But I have install it. How?

I've got a problem regarding the excel2img module library that is about 'win32com'.
I've check the solutions at link follows:
https://superuser.com/questions/609447/how-to-install-the-win32com-python-library
Still getting an error "ImportError: No module named win32com.client" after installing pywin32 lib
ImportError: No module named win32com.client
However, the error still there.
'''Traceback (most recent call last):
File "C:/Users/Lenovo/PycharmProjects/HO_P1/excelToImage.py", line 4, in
import excel2img
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\excel2img_init_.py", line 1, in
from .excel2img import export_img
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\excel2img\excel2img.py", line 18, in
import win32com.client
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\win32com_init_.py", line 1, in
from win32.com import *
ModuleNotFoundError: No module named 'win32.com'
'''
image shows that I've install the module
Can anyone give me a suggestion to solve this problem?
Did you accidentally misspell the module name?
It's
from win32com import *
Not
from win32.com import *
you maybe installed more lib than you really need and the additional lib creates this reference error
try to only keep pywin32 and uninstall other lib with win32 in the name

tensorflow - Import Error : cannot import name rnn_cell_impl

Using anaconda, I had installed python 2.7 and tensorflow 1.0.0 to run the package called DeepNovo.
Then I got following error when I tried to run this python script:
Traceback (most recent call last):
File "deepnovo_main.py", line 15, in module import deepnovo_model
File "/Data2/HJE/DeepNovo/deepnovo_model.py", line 43, in <module>
from tensorflow.python.ops import rnn_cell_impl
ImportError: cannot import name rnn_cell_impl
Anyone any ideas?
You want to include a package. That package already required other package. package name is rnn_cell_impl. Make sure path is correct. You can read python modules packages

Python - ModuleNotFoundError: No module named 'pyown'

so i'm making my first telegram bot, and when compiling code in ConEmu I got this error:
Traceback (most recent call last):
File "echobot.py", line 1, in <module>
import pyown
ModuleNotFoundError: No module named 'pyown'
help me please.
import pyown
ModuleNotFoundError: No module named 'pyown'
Are you sure that the library is called pyown, not pyowm?
https://pypi.org/project/pyowm/
It can't find pyown library. Install this library first, either to your working folder's library folder or install it globally. Then import pyown library on your py file. Then write rest of the codes.

After installed asprise_ocr_sdk_python_api on mac, got "No module named 'ocr'"

I ran both
sudo pip install asprise_ocr_sdk_python_api
pip install asprise_ocr_sdk_python_api
Got message
"Requirement already satisfied: asprise_ocr_sdk_python_api in /Users/myid/miniconda3/envs/competition/lib/python3.5/site-packages"
But when I ran asprise_ocr to test:
Got the following error:
Traceback (most recent call last):
File "/Users/myuser/miniconda3/envs/competition/bin/asprise_ocr", line 7, in <module>
from asprise_ocr_api.ocr_app import run_ocr_app
File "/Users/myuser/miniconda3/envs/competition/lib/python3.5/site-packages/asprise_ocr_api/__init__.py", line 1, in <module>
from ocr import *
ImportError: No module named 'ocr'
The asprise_ocr_api module doesn't do submodule imports correctly in Python 3.
For example init.py contains from ocr import *. For a sub-module in Python 3 that should be from .ocr import *. Idem for from ocr_app import OcrApp, run_ocr_app. That should be from .ocr_app import OcrApp, run_ocr_app.
After making these changes in all files it imports correctly.
i've tried:
import ocr
same error:
ModuleNotFoundError: No module named 'ocr'
i am using python 3

ImportError: No module named 'version'

I pip the "opencc"
when i shell the code below
import opencc
it shows
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import opencc
File "C:\Python34\lib\site-packages\opencc\__init__.py", line 6, in <module>
from version import __version__
ImportError: No module named 'version'
but "____init__.py"and"version.py" are in the same directory
C:\Python34\lib\site-packages\opencc
opencc
|----__init__.py
|----version.py
file:version.py
__version__ = '0.1'
when i change
from version import __version__
into
__version__ = '0.1'
opencc,it works
I know it doesn't make a big difference,but i just want to know why the init.py can't import the module version.py in the same directory,
The opencc module is not compatible with Python 3. It can currently only be used on Python 2.
Specifically, the version module is part of the opencc package, but in Python 3 you'd need to use absolute imports, from opencc.version import __version__ or from .version import __version__. There will be other issues with the code too.
add package , or coppy it to cp -R Version /usr/local/lib/python3.9 it work for me

Categories

Resources