Traceback ImageAi - python

Good afternoon, For the second day I can't move forward because of this problem. I've been doing python recently. I downloaded all packages, checked with the versions I have python 3.10. And it gives this error every time. Tell me what to do, please.
D:\pythonProject\venv\Scripts\python.exe D:\pythonProject\main.py
Traceback (most recent call last):
File "D:\pythonProject\main.py", line 1, in <module>
from imageai.Detection import ObjectDetection
File "D:\pythonProject\venv\lib\site-packages\imageai\Detection\__init__.py", line 2, in <module>
from imageai.Detection.keras_retinanet.models.resnet import resnet50_retinanet
File "D:\pythonProject\venv\lib\site-packages\imageai\Detection\keras_retinanet\models\resnet.py", line 19, in <module>
import keras
ModuleNotFoundError: No module named 'keras'
Process finished with exit code 1
Deleted, changed the interpreter (PyCharm to VS), changed the file paths.

Related

When importing keras on my Raspberry Pi 4 I get the same error

I have installed Tensorflow and all its libraries following various websites and my terminal actually tells me they are installed and have been upgraded to their last versions, but somehow when I try to run the code in Python it keeps giving me the same error. In case you were wondering the Python code itself works fine on my laptop.
The error code says as it follows:
tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/media/pi/8F3B-E71C/TRachscope/livefeed_tensorflow_model.py", line 5, in <module>
from keras import models
File "/home/pi/.local/lib/python3.7/site-packages/keras/__init__.py", line 25, in <module>
from keras import models
File "/home/pi/.local/lib/python3.7/site-packages/keras/models.py", line 19, in <module>
from keras import backend
File "/home/pi/.local/lib/python3.7/site-packages/keras/backend.py", line 39, in <module>
from tensorflow.python.eager.context import get_config
ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' (/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/context.py)**

Python Lifetimes Module Error

I was trying to load the Lifetimes Module on my Linux AMI server.
I installed it just fine and everything seemed to work with no error.
However when I went to use it I got the error below. (tried to do a few things that I thought would fix it but nothing has worked)
import lifetimes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lifetimes/__init__.py", line 1, in <module>
from .estimation import BetaGeoFitter, ParetoNBDFitter, GammaGammaFitter
File "lifetimes/estimation.py", line 2, in <module>
from collections import OrderedDict
ImportError: cannot import name OrderedDict
http://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux
This is what worked for me but I did have to re-install the modules that were on 2.6 into 2.7

ImportError: cannot import name pynestkernel

So I spend last night trying to install nest (and pynest) to use with PyNN, and I am currently stuck. When I try to import nest I get:
>>> import nest
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nest/__init__.py", line 52, in <module>
from . import pynestkernel as _kernel
ImportError: cannot import name pynestkernel
However, when I make the make installcheck it passes all the pynest tests.
I am using OS x Yosemite, and I did a new install of python 2.7.9 using macport.
Tried:
easy_install python-nest
Now I am getting a new error.
Getting:
>>> import pyNN.nest as sim
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pyNN.nest as sim
File "/Library/Python/2.7/site-packages/pyNN/nest/__init__.py", line 13, in <module>
from pyNN.nest import simulator
File "/Library/Python/2.7/site-packages/pyNN/nest/simulator.py", line 500, in <module>
state = _State() # a Singleton, so only a single instance ever exists
File "/Library/Python/2.7/site-packages/pyNN/nest/simulator.py", line 60, in __init__
self._cache_num_processes = nest.GetKernelStatus()['num_processes'] # avoids blocking if only some nodes call num_processes
AttributeError: 'module' object has no attribute 'GetKernelStatus'
Try using setuptools to install nest with easy_install python-nest.
I am trying something similar, with the further goal of having it working with python 3. So far I used the following commands:
git clone https://github.com/nest/nest-simulator.git
cd nest-simulator
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/nest -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib .
make
make install
which runs without errors and I can happily run nest. Iam still having troubles running pyNN (see https://laurentperrinet.github.io/sciblog/posts/2016-06-01-compiling-and-using-pynn-%2B-nest-%2B-python3.html)

Python error: No module named RuntimeError

Im trying to figured out this problem. Yesterday I installed PyScripter and since then, scripts doesnt work. When I run any script (in PyScripter or IDLE) and trying to "import arcpy", it gets this error:
import arcpy
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import arcpy
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 17, in <module>
from geoprocessing import gp
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from _base import *
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "C:\Python26\ArcGIS10.0\lib\arcgisscripting.py", line 81, in <module>
from RuntimeError import RuntimeError
ImportError: No module named RuntimeError
Have somebody any suggestion how to fix it?
Thanks to all very much!
Sounds like the module is not installed properly (or at all). To verify, do the following:
open a shell and start the python shell by typing python
(If this doesn't display an error, check that python is added to your system path or if it is even installed at all. But if you've used Python on said machine maybe system path issue)
enter the commmand help('modules')
review the list of modules that's returned to see whether arcpy is included
if not, then you may have to reinstall the module

Error installing ZeroMQ

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/zmq/__init__.py", line 51, in <module>
from zmq import core, devices
File "/usr/local/lib/python2.7/dist-packages/zmq/core/__init__.py", line 26, in <module>
from zmq.core import (constants, error, message, context,
ImportError: /usr/local/lib/python2.7/dist-packages/zmq/core/socket.so: undefined symbol:
zmq_sendmsg
I am getting above error. I have followed steps given on the official site of ZeroMQ.
Had a similar issue when building for Java, UnsatisifedLinkError, after the so libraries were copied to /usr/local/lib, seems like your issue might be the same...I fixed it by logging off then logging back in again, I read something about the libraries not being visible until the user logs back in, weird, but it worked for me.

Categories