Reputation: 1971
Im tring to install python binding for gstreamer. I have followed these steps.
git clone https://github.com/GStreamer/gst-python.git
cd gst-python
GSTREAMER_VERSION=$(gst-launch-1.0 --version | grep version | tr -s ' ' '\n' | tail -1)
git checkout $GSTREAMER_VERSION
PYTHON=/usr/bin/python3
LIBPYTHON=$($PYTHON -c 'from distutils import sysconfig;print(sysconfig.get_config_var("LDLIBRARY"))')
LIBPYTHONPATH=$(dirname $(ldconfig -p | grep -w $LIBPYTHON | head -1 | tr ' ' '\n' | grep /))
PREFIX=$(dirname $(dirname $(which python))) # in jetson nano, `PREFIX=~/.local` to use local site-packages,
./autogen.sh --disable-gtk-doc --noconfigure
./configure --with-libpython-dir=$LIBPYTHONPATH --prefix $PREFIX
make
make install
After installing this, Im getting the error AttributeError: module 'gi' has no attribute 'require_version'
python3 -c "import gi; print(gi.__spec__)"
ModuleSpec(name='gi', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f7c1405df28>, origin='/gst-python/gi/__init__.py', submodule_search_locations=['/gst-python/gi'])
I have gi folders both in
/gst-python/gi
and site-packages
Upvotes: 2
Views: 515