i install keras_cv on macbook M1:
pip install keras_cv
and run this code
import keras_cv
and get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/__init__.py", line 21, in <module>
from keras_cv import callbacks
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/callbacks/__init__.py", line 14, in <module>
from keras_cv.callbacks.pycoco_callback import PyCOCOCallback
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/callbacks/pycoco_callback.py", line 18, in <module>
from keras_cv.metrics.coco import compute_pycoco_metrics
ImportError: cannot import name 'compute_pycoco_metrics' from 'keras_cv.metrics.coco' (/opt/homebrew/lib/python3.10/site-packages/keras_cv/metrics/coco/__init__.py)
How i can fix this?
Clone and install keras_cv yourselfe:
git clone https://github.com/keras-team/keras-cv.git
cd keras-cv
python setup.py install
You may need install pycocotools.
$ pip install pycocotools
Related
Error Message:
Traceback (most recent call last):
File "/home/upboard/visioonbot/Connect4Py/connect4.py", line 7, in <module>
import dbus
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/__init__.py", line 77, in <module>
import dbus.types as types
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/_dbus_bindings/__init__.py", line 13, in <module>
import dbus.lowlevel as __dbus_lowlevel
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/dbus/lowlevel.py", line 32, in <module>
from _dbus_bindings import (
File "/home/upboard/visioonbot/Connect4Py/venv/lib/python3.6/site-packages/_dbus_bindings/ErrorMessage.py", line 13, in <module>
import dbus.lowlevel as __dbus_lowlevel
AttributeError: module 'dbus' has no attribute 'lowlevel'
Process finished with exit code 1
Here are the dbus files mentioned in the error path:
and the dbus_bindings files:
What is missing? How to solve this issue?
I've already reinstalled the packages using
sudo apt install python3-dbus
and
sudo apt-get install -y python-dbus
It looks like your issue might be that you are using a venv. python3-dbus does not play nicely with venv's.
You can try using --system-site-packages as suggested in https://stackoverflow.com/a/13367493/7721752.
Or use pydbus and vext.gi
I searched a lot but I can't find an answer!
I am trying to install jupyter as I usually do. But for 3 days it has not worked!
When I install it with the following commands:
spark#spark-VirtualBox:~$ sudo apt install python3-pip
spark#spark-VirtualBox:~$ pip3 install jupyter
I run my jupyter notebook with:
spark#spark-VirtualBox:~$ jupyter notebook
And I get the following error message:
Traceback (most recent call last):
File "/home/spark/.local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/home/spark/.local/lib/python3.5/site-packages/notebook/__init__.py", line 27, in <module>
from .nbextensions import install_nbextension
File "/home/spark/.local/lib/python3.5/site-packages/notebook/nbextensions.py", line 26, in <module>
from .config_manager import BaseJSONConfigManager
File "/home/spark/.local/lib/python3.5/site-packages/notebook/config_manager.py", line 14, in <module>
from traitlets.config import LoggingConfigurable
File "/home/spark/.local/lib/python3.5/site-packages/traitlets/__init__.py", line 3, in <module>
from . import traitlets
File "/home/spark/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 1779
return repr(f'{value.__module__}.{value.__name__}')
^
SyntaxError: invalid syntax
Could you help me please!
Thank you very much in advance.
ModuleNotFoundError on object-detection
Error StackTrace
Traceback (most recent call last):
File "train.py", line 58, in <module>
from object_detection.builders import model_builder
File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 21, in <module>
from object_detection.builders import box_coder_builder
File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\box_coder_builder.py", line 17, in <module>
from object_detection.box_coders import faster_rcnn_box_coder
ModuleNotFoundError: No module named 'object_detection.box_coders'
Seems your package is broken. Try reinstall it:
pip install --force-reinstall object-detection
Also see the docs's requires:
Requires: Python >=3.5, !=3.7.*
It only works with Python>=3.5 but no Python 3.7.*, so it doesn't work with your current Python. Consider install Python 3.5 and it should e fine.
I am trying to install AppiumLibrary with robotframework in jython
Steps followed:
jython -m pip install robotframework-appiumLibrary
Error:
Downloading/unpacking sauceclient>=0.1.0 (from robotframework-appiumLibrary)
Downloading sauceclient-0.2.1.tar.gz
Running setup.py (path:C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhishek
singh\sauceclient\setup.py) egg_info for package sauceclient
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\saucecl
ient\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\sauceclient
\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
**AttributeError: 'tuple' object has no attribute 'major'**
Anybody has any idea how to use this libaray?
You need to debug sauceclient-0.2.1.tar.gz. See if you can install it before installing robotframework-appiumLibrary.
To fix the code in "sauceclient.py" edit to:
is_py2 = sys.version_info[0] is 2
Thank you so much ,it did work for me here are the steps I followed:
1.Download sauceclient-0.2.1 and Changed sauceclient.py
is_py2 = sys.version_info[0] is 2
2. Install sauceclient-0.2.1
jython -m setup.py install
3.Run :
jython -m pip install robotframework-appiumLibrary
I'm trying to install couchdb app on debian using the following command
couchapp push http://user:pass#localhost:5984/acra-appname
and I'm having the following error output:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/restkit/__init__.py", line 9, in <module>
from restkit.conn import Connection
File "/usr/local/lib/python2.6/dist-packages/restkit/conn.py", line 14, in <module>
from socketpool import Connector
ImportError: No module named socketpool
Traceback (most recent call last):
File "/usr/local/bin/couchapp", line 7, in <module>
from couchapp.dispatch import run
File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 10, in <module>
import couchapp.commands as commands
File "/usr/local/lib/python2.6/dist-packages/couchapp/commands.py", line 15, in <module>
from couchapp import clone_app
File "/usr/local/lib/python2.6/dist-packages/couchapp/clone_app.py", line 15, in <module>
from couchapp.errors import AppError
File "/usr/local/lib/python2.6/dist-packages/couchapp/errors.py", line 7, in <module>
from restkit import ResourceError
ImportError: cannot import name ResourceError
As far as I understand the error is:
ImportError: No module named socketpool
How can I install this module or how to resolve the problem?
As Ifthikhan sugessted: Install it using a package manager such as apt-get and thereafter using pip you can install socketpool.
I had this problem when installing couchapp. I used pip to install it, and I thought it completed, but when I ran it I had the ImportError problem. Turns out the pip install didn't succeed and I first needed to:
apt-get install python-dev
Then when I did a
pip install couchapp
all of the dependencies were installed and couchapp ran without a problem.