ImportError: No module named 'yolo_utils' : Analytics Vidhya - yolo

I was running the code given here:
https://www.analyticsvidhya.com/blog/2018/12/practical-guide-object-detection-yolo-framewor-python/#comment-156059
I get error " [
ImportError: No module named ‘yolo_utils’
So I copy pasted the source code of yolo_utils.py. But, it still gave error" ImportError: cannot import name ‘read_classes’"

you have to copy this code**strong text** into q yolo_utils.py file and add it into your project

Related

I can't use the module I created in my main python file

I created a module named module_1:
def learn(programming_lang):
print("I am learning " + programming_lang)
and I want to use it in my main Python file.
module_1.learn("Python")
How can I do that?
in main Python file add this line
import module_1

unable to import 'econml' in pandas

I have installed the 'econml' package but when I try to import DML, using :
from econml.dml import DML
I am getting the following error:
'ImportError: cannot import name 'show_config' from 'numpy' (unknown location)'
I am wondering how can I fix this issue.
Two steps:
Find any file named as "numpy.py" in your script directory and change it into another name.
Delete any file named as "numpy.pyc" or any other file generated while compiling your code.

How to fix "End of HDF5 error back trace Unable to open/create file"

i try to open a h5 file and it give me an error and cannot read it. I show here the code which really basic, and the file i located it in the same directory I'm working on. This is the code:
I already updated pandas, pytables, pathlib
I tried with h5py.File
store = pd.HDFStore(path_to_file)
df = store['data']
store.close()
This is the error:
File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new
HDF5ExtError: HDF5 error back trace
...
End of HDF5 error back trace
Unable to open/create file
I hope you can help me
Many thanks!

ImportError: No module named spatial_dropout, caffe, ENet

When I try to train this net i got an error:
ImportError: No module named spatial_dropout
Does anybody know how to fix this?
I tried to use this instruction.
Make sure you've reset your $CAFFE_PATH, so it's set to the absolute path of caffe-enet, and that you've done:
export PYTHONPATH="$CAFFE_PATH/python:$PYTHONPATH"
This fixed it for me.

ImportError: No module named texttable (igraph, py2exe,cx freeze/gui2exe)

I've spent 2 days trying to solve this problem and I'm getting nowhere.
I try to get an executable from my python script.
Script is running with no issues. I build graphs in it by using igraph which is my favorite choice for this task.
After compiling my script I get the results as expected (Dist folder with my exe and its stuff in it)
When I try to run the exe I get this annoying error message:
File "igraph\__init__.pyc", line 36, in <module>
File "igraph\clustering.pyc", line 38, in <module>
File "igraph\summary.pyc", line 36, in <module>
File "igraph\vendor\__init__.pyc", line 33, in vendor_import
ImportError: No module named texttable
I checked many threads related to ImportError. I went in the folder containing texttable and IT'S THERE! It's not missing! I've tryed something with changing the path but still no succes.
at the beginning of my script I have:
import re
import os
import csv
import math
from igraph import *
import thread
import unicodedata
from time import sleep
import wx.grid as gridlib
import sys
import Tkinter
from Tkinter import *
I have tryed from igraph import Graph but it would still look for that TEXTTABLE.
I've tried using py2exe, cx freeze and also the nice Gui interface to them GUI2exe. No luck. Same Error whatever I try.
I'm sorry if the solution is obvious. I'm not a pro. Any help is much appreciated!
igraph is importing texttable dynamically, so the freezing tools don't know that they need to copy the module in.
In cx_Freeze, you could add igraph.vendor to 'packages' (see the docs) to force it to copy everything from that package. There's probably a similar option for py2exe.
Alternatively, if you put import igraph.vendor.texttable somewhere in the code, the freezing tools will pick that up and know to include it.