I installed Docker on raspberry PI 3b. I want to configure a Python image with Mediapipe.
The basic image is demosense/raspberrypi3-opencv.
The way I installed mediapipe is
apt-get update
apt update
apt-get update
pip install mediapipe-rpi3 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
And then I realized that there was this mistake
root#ce01ec797bf6:/# python
Python 3.6.4 (default, Feb 13 2018, 04:59:47)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> import mediapipe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/mediapipe/__init__.py", line 16, in <module>
from mediapipe.python import *
File "/usr/local/lib/python3.6/site-packages/mediapipe/python/__init__.py", line 17, in <module>
from mediapipe.python._framework_bindings import resource_util
ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'
Related
I installed Tensorflow using pyenv. But whenever i import it gives me this error.I am using Debian in raspberry pi4.My python version is 3.7.12 and tensorflow version is 2.5.0.
''' pi#raspberrypi:~/project $ python
Python 3.7.12 (default, Mar 22 2022, 14:27:41)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
import tensorflow
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "", line 1, in
File "/home/pi/.pyenv/versions/3.7.12/lib/python3.7/site-packages/tensorflow/init.py", line 41, in
from tensorflow.python.tools import module_util as _module_util
File "/home/pi/.pyenv/versions/3.7.12/lib/python3.7/site-packages/tensorflow/python/init.py", line 40, in
from tensorflow.python.eager import context
File "/home/pi/.pyenv/versions/3.7.12/lib/python3.7/site-packages/tensorflow/python/eager/context.py", line 37, in
from tensorflow.python.client import pywrap_tf_session
File "/home/pi/.pyenv/versions/3.7.12/lib/python3.7/site-packages/tensorflow/python/client/pywrap_tf_session.py", line 23, in
from tensorflow.python._pywrap_tf_session import *
ImportError: SystemError: <built-in method contains of dict object at 0x7f741852d0> returned a result with an error set
'''
The error message tries to say that Tensorflow needs a recent version of numpy. So,try to upgrade numpy pip3 install --upgrade numpy
I have installed Microsoft Visual C++ 14.0 and I have uninstalled and installed Anaconda and packages(pandas, pandas-datareader) several times.
Now I installed zipline by pip install zipline but when I try to import zipline I got a importerror
Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:53:16) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\__init__.py", line 25, in <module>
from . import data
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\data\__init__.py", line 1, in <module>
from . import loader
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\data\loader.py", line 26, in <module>
from pandas.io.data import DataReader
ImportError: No module named 'pandas.io.data'
I installed h5py through the package mingw64-i686-python-h5py in MSYS2. Importing it in a MinGW shell throws the following error:
Python 3.8.2 (default, Apr 9 2020, 14:12:45) [GCC 9.3.0 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:/msys64/mingw32/lib/python3.8/site-packages/h5py/__init__.py", line 34, in <module>
from . import version
File "C:/msys64/mingw32/lib/python3.8/site-packages/h5py/version.py", line 17, in <module>
from . import h5 as _h5
File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: DLL load failed while importing defs: The specified procedure could not be found.
Reinstalling the package did not fix it. I installed numpy the same way and it works just fine.
I am trying to use python-mbus for python 3, i have installed it with
sudo apt-get install python3-dbus
However the import fails with:
asdf#asdf:~$ python3
Python 3.6.3 (default, Oct 3 2017, 21:16:13)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbus
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/dbus/__init__.py", line 77, in <module>
import dbus.types as types
File "/usr/local/lib/python3.6/dist-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
ImportError: /usr/local/lib/python3.6/dist-packages/_dbus_bindings.so: undefined symbol: _Py_ZeroStruct
I have also installed it with:
pip3 uninstall dbus-python
But i still get the same error:
asdf#asdf:~$ python3
Python 3.6.3 (default, Oct 3 2017, 21:16:13)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbus
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/asdf/.local/lib/python3.6/site-packages/dbus/__init__.py", line 77, in <module>
import dbus.types as types
File "/home/asdf/.local/lib/python3.6/site-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
ImportError: /home/asdf/.local/lib/python3.6/site-packages/_dbus_bindings.so: undefined symbol: _Py_ZeroStruct
This is in sys.path:
>>> print (sys.path)
['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/asdf/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.6/dist-packages']
Im runnin on Debian GNU/Linux buster/sid
Any idea of what am I doing wrong?
I'm not exactly sure how I fixed this (can't comment), but I had the exact same problem and I did:
sudo pip3 uninstall dbus-python
sudo aptitude update && sudo aptitude upgrade
sudo aptitude -f
After which aptitude alerted me of some dependency issues with Python, and I "downgraded" a version of Python I had installed on Ubuntu Xenial to the default package provided by Artful. Now, import dbus on Python 3.6.3 doesn't pass any errors. Don't know if it actually works well, though.
Maybe you'll be able to fix it in a similar fashion, since Debian and Ubuntu packages are usually the same.
I have recently upgraded the system to 16.04 Gnome. The most troubling thing that I am facing is that I cannot import a NAOqi library for my work. The python version of this library was pretty simple to set-up. One just has to untar the file and then enter a path variable called PYTHONPATH pointing to this library and it worked like a charm in 14.04. Now since upgrade I am facing:
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import naoqi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module>
import qi
File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module>
from _qi import Application as _Application
ImportError: libqipython.so: cannot open shared object file: No such file or directory
If I add a path variable:
export LD_LIBRARY_PATH=:/home/dell/nao_sdk/pynaoqi/
The error changes to:
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import naoqi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module>
import qi
File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module>
from _qi import Application as _Application
ImportError: libboost_regex.so.1.55.0: cannot open shared object file: No such file or directory
Please help me what should I do to get it working? I have also used python 2.6.9 but same error occurs with error below.
ImportError: libboost_python.so.1.55.0: cannot open shared object file: No such file or directory
Installing libboost1.55 did the trick. 16.04 comes with libboost1.58 but naoqi is not yet compatible with it. Manual installation of libboost1.55 solved the import error.