ImportError: cannot import name 'Darknet' from 'darknet' - python

I am trying to use the darknet package in my Python project, but I am getting the following error: ImportError: cannot import name 'Darknet' from 'darknet'
I have tried uninstalling and reinstalling the package, but the issue persists. Here is the relevant code:
from darknet import Darknet
model = Darknet("cfg/yolov3.cfg")
I am using Python version 3.9 and 'darknet' version 0.2. I am running on Windows 11.

Related

ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function'

When I try to install tensorflow in jupyter notebook I get the following error:
ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function'
I have to add that I have just installed tensorflow-gpu.
Before it worked fine.
Also I have installed CUDA and CUDNN.

ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'

I'm getting this error while loading the tensorflow addons library
import tensorflow_addons as tfa
ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'
This error is because you have incompatibility issues between your TensorFlow, Python and tensorflow-addons. Uninstall the tensorflow-addons and install the version based on the table below. Refer the Github repo for more information.

cannot import name '_pywrap_utils' from 'tensorflow.python'

I am working on pose estimation using OpenPose. For that I installed TensorFlow GPU and installed all the requirements including CUDA development kit.
While running the Python script:
C:\Users\abhi\Anaconda3\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py, I encountered the following error:
ImportError: cannot import name '_pywrap_utils' from
'tensorflow.python'
(C:\Users\abhi\Anaconda3\lib\site-packages\tensorflow\python__init__.py)
I tried searching for _pywrap_utils file but there was no such file.
Try pip3 install pywrap and pip3 install tensorflow pywrap utils should be included with tensorflow. If it is not found, that means TF was not installed correctly.

ImportError: cannot import name 'comb'

I am using the updated scikit-learn version 0.18.1 but still I am getting the
ImportError: cannot import name 'comb' when I try to use the model_selection.
Using Spyder IDE latest version.

Python: cannot imoport keras, ImportError: No module named tensorflow

I just update keras package to 1.1.0 version. But it canot be properly imported.
Error message:
import tensorflow as tf
ImportError: No module named tensorflow
It seems that the new version requires TensorFlow. I use anaconda in windows 10.
How to solve the problem?
It has been fixed by changing backend setup to 'theano'

Categories

Resources