ImportError: No module named darkflow.cli - python-3.x

I just want to do live object recognition from web-came using YOLO and while testing it, I am facing some issues. I am using Ubuntu os. Here is the error I get in terminal.
rajan#RGR:~/yolo setup/YOLO_Object_Detection-master$ ./flow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi
Traceback (most recent call last):
File "./flow", line 4, in <module>
from darkflow.cli import cliHandler
ImportError: No module named darkflow.cli
Here is the link of the git repository which I am using as refenrece:
https://github.com/llSourcell/YOLO_Object_Detection

Related

'Invalid syntax' error when importing torch (Linux)

I'm trying to install torch under miniconda and simple import torch gives me the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/__init__.py", line 779, in <module>
from .serialization import save, load
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 18, in <module>
from typing_extensions import TypeAlias
File "/home/username/.local/lib/python3.8/site-packages/typing_extensions.py", line 880
if stripped_args
Interestingly, if I repeat import torch again the error message changes:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/tcm17/username/miniconda3/lib/python3.8/site-packages/torch/__init__.py", line 249, in <module>
for name in dir(_C):
NameError: name '_C' is not defined
I'm not using notebooks, python version is 3.8.16, pytorch version is 1.13.1. Miniconda is installed in a local folder (it's a university server so I can only do it like this due to disk space restrictions), the server runs on Ubuntu.
What could possibly be the problem?
The only recommendation I found for similar problems is to install Cython but it didn't help.
Downgraded to python 3.6 and this somehow solved the problem.

ModuleNotFoundError: No module named 'torch.backends'

I would like to run the yolov5 source code for object detection on visual studio, but every time I run it, I get the following error. I tried to post the full code here but it kept giving me an error. Anyone who can help?
PS C:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project> & "C:/Users/ALLO CEDRIC BOLAMBA/AppData/Local/Microsoft/WindowsApps/python3.10.exe" "c:/Users/ALLO CEDRIC BOLAMBA/Desktop/Project/detect.py"
Traceback (most recent call last):
File "c:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project\detect.py", line 8, in <module>
import torch.backends.cudnn as cudnn
ModuleNotFoundError: No module named 'torch.backends'
PS C:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project>

autosklearn installation. Error: No module named 'sklearn.metrics.classification'

I'm trying to execute a script that uses Scikit and autosklearn on Ubuntu 20, python 3.8
I have followed the instructions to install sckit https://scikit-learn.org/stable/install.html and autosklearn installation https://automl.github.io/auto-sklearn/master/installation.html
However I'm getting
Exception ignored in: <function AutoML.__del__ at 0x7f37c6ee9160>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/autosklearn/automl.py", line 1380, in __del__
self._backend.context.delete_directories(force=False)
AttributeError: 'AutoMLClassifier' object has no attribute '_backend'
Traceback (most recent call last):
File "myscript.py", line 261, in <module>
import model_snow_magn_only_package
File "/myfolder/myscript.py", line 150, in <module>
clf = pickle.load(open(model_name, "rb"))
ModuleNotFoundError: No module named 'sklearn.metrics.classification'
I have tried other releases of these packages but without success.
Does anyone have an idea of which releases/packages to install to make it work?

Error while configuring pycharm with odoo-13

I am trying to configure a new project to Odoo on Windows however when I run the project after specifying odoo-bin as the Script path this error appears to my:
Traceback (most recent call last):
File "D:/Odoo 13_20200903/server/odoo-bin", line 5, in <module>
import odoo
File "D:\Odoo 13_20200903\server\odoo\__init__.py", line 75, in <module>
import PyPDF2
ModuleNotFoundError: No module named 'PyPDF2'
Any idea how can it be fixed?
Thanks in Advance
The Python interpreter used differs from the interpreter in which the libraries are loaded, make sure that the required interpreter path, may be inside a venv or another name.

How to deal with "ModuleNotFoundError: No module named 'setup' "

I installed the module "pyunicorn" in Ubuntu 16.04 LTS and all the dependencies but when I import the module in python 3.7.3 i get this error :
>>> import pyunicorn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/anaconda3/lib/python3.7/site-packages/pyunicorn/__init__.py", line 43, in <module>
from setup import __version__
ModuleNotFoundError: No module named 'setup'
What should i do to make it run properly???
I had this problem. I wanted to install it on Google Colab. I tried installing pyunicorn directly from Github and it worked for me. Try using following instruction:
pip install git+https://github.com/pik-copan/pyunicorn.git#egg=pyunicorn

Resources