Community
cancel
Showing results for 
Search instead for 
Did you mean: 
venkataram9
Beginner
106 Views

Installing dlstreamer on windows

Hi Team,

I have installed the dlstreamer in windows using this link . the installation is successful but i was unable to access python api. i have run the below command in the python environment.

>>>  import gi

Traceback (most recent call last):

File "(stdin)", line 1, in (module)

ModuleNotFoundError: No module name 'gi'

Below are my questions on dlstreamer installation:

1. Is dlstreamer python api supported in windows?

2. if yes, please help me to access the python api for dlstreamer

Any suggestion/help is welcome

 

Regards,

Venkat

0 Kudos
4 Replies
Iffa_Intel
Moderator
84 Views

Hi,


Your problem seems to be related to the gi package instead of the whole Python package: ModuleNotFoundError: No module name 'gi'.


Try to install that particular pygobject package.

You may refer to this: https://stackoverflow.com/questions/44213921/python-3-installing-gi-package-with-pip


and this: https://pypi.org/project/PyGObject/



Sincerely,

Iffa


venkataram9
Beginner
66 Views

Thank you for your reply

As i am trying to install in windows, the links does not help me

below are the logs when i tried to install

> pip install gi

ERROR: Could not find a version that satisfies the requirement gi

ERROR: No matching distribution found for gi

 

> pip install PyGobject
Collecting pygobject
Using cached https://files.pythonhosted.org/packages/8c/1f/76533985b054473ef6ab1ba4d9c00d62da502f8b43d3171ae588ec
81ae93/PyGObject-3.30.4.tar.gz
Requirement already satisfied: pycairo>=1.11.1 in c:\users\dyeaw\.virtualenvs\gaphor-s4e8uszi\lib\site-packages (fr
om pygobject) (1.18.0)
Building wheels for collected packages: pygobject
Building wheel for pygobject (setup.py) ... error
Complete output from command c:\users\dyeaw\.virtualenvs\gaphor-s4e8uszi\scripts\python.exe -u -c "import setupto
ols, tokenize;__file__='C:\\Users\\DYEAW\\AppData\\Local\\Temp\\pip-install-18si_3lh\\pygobject\\setup.py';f=getatt
r(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe
c'))" bdist_wheel -d C:\Users\DYEAW\AppData\Local\Temp\pip-wheel-48rcf6gu --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.7\pygtkcompat
creating build\lib.win-amd64-3.7\gi
copying gi\docstring.py -> build\lib.win-amd64-3.7\gi
copying gi\importer.py -> build\lib.win-amd64-3.7\gi
copying gi\module.py -> build\lib.win-amd64-3.7\gi
copying gi\pygtkcompat.py -> build\lib.win-amd64-3.7\gi
copying gi\types.py -> build\lib.win-amd64-3.7\gi
copying gi\_compat.py -> build\lib.win-amd64-3.7\gi
copying gi\_constants.py -> build\lib.win-amd64-3.7\gi
copying gi\_error.py -> build\lib.win-amd64-3.7\gi
copying gi\_gtktemplate.py -> build\lib.win-amd64-3.7\gi
copying gi\_option.py -> build\lib.win-amd64-3.7\gi
copying gi\_ossighelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_propertyhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_signalhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\__init__.py -> build\lib.win-amd64-3.7\gi
creating build\lib.win-amd64-3.7\gi\repository
copying gi\repository\__init__.py -> build\lib.win-amd64-3.7\gi\repository
creating build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GdkPixbuf.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gio.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GLib.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GObject.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Pango.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\__init__.py -> build\lib.win-amd64-3.7\gi\overrides
running build_ext
pycairo: new API
pycairo: trying include directory: 'c:\\users\\dyeaw\\.virtualenvs\\gaphor-s4e8uszi\\lib\\site-packages\\cairo\\i
nclude'
pycairo: found 'c:\\users\\dyeaw\\.virtualenvs\\gaphor-s4e8uszi\\lib\\site-packages\\cairo\\include\\py3cairo.h'
building 'gi._gi' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\gi
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c
/nologo /Ox /W3 /GL /DNDEBUG /MD -DPY_SSIZE_T_CLEAN -IC:\Users\DYEAW\AppData\Local\Temp\pip-install-18si_3lh\pygob
ject -IC:\Users\DYEAW\AppData\Local\Temp\pip-install-18si_3lh\pygobject\gi -IC:\Python37\include -IC:\Python37\incl
ude "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC
:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\sh
ared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\
include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcgi\gimodule
.c /Fobuild\temp.win-amd64-3.7\Release\gi\gimodule.obj -FImsvc_recommended_pragmas.h
gimodule.c
gi\gimodule.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directo
ry
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\
bin\\HostX86\\x64\\cl.exe' failed with exit status 2

----------------------------------------
Failed building wheel for pygobject
Running setup.py clean for pygobject
Failed to build pygobject
Installing collected packages: pygobject
Running setup.py install for pygobject ... error
Complete output from command c:\users\dyeaw\.virtualenvs\gaphor-s4e8uszi\scripts\python.exe -u -c "import setup
tools, tokenize;__file__='C:\\Users\\DYEAW\\AppData\\Local\\Temp\\pip-install-18si_3lh\\pygobject\\setup.py';f=geta
ttr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'e
xec'))" install --record C:\Users\DYEAW\AppData\Local\Temp\pip-record-1bwkyhn3\install-record.txt --single-version-
externally-managed --compile --install-headers c:\users\dyeaw\.virtualenvs\gaphor-s4e8uszi\include\site\python3.7\p
ygobject:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.7\pygtkcompat
creating build\lib.win-amd64-3.7\gi
copying gi\docstring.py -> build\lib.win-amd64-3.7\gi
copying gi\importer.py -> build\lib.win-amd64-3.7\gi
copying gi\module.py -> build\lib.win-amd64-3.7\gi
copying gi\pygtkcompat.py -> build\lib.win-amd64-3.7\gi
copying gi\types.py -> build\lib.win-amd64-3.7\gi
copying gi\_compat.py -> build\lib.win-amd64-3.7\gi
copying gi\_constants.py -> build\lib.win-amd64-3.7\gi
copying gi\_error.py -> build\lib.win-amd64-3.7\gi
copying gi\_gtktemplate.py -> build\lib.win-amd64-3.7\gi
copying gi\_option.py -> build\lib.win-amd64-3.7\gi
copying gi\_ossighelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_propertyhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_signalhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\__init__.py -> build\lib.win-amd64-3.7\gi
creating build\lib.win-amd64-3.7\gi\repository
copying gi\repository\__init__.py -> build\lib.win-amd64-3.7\gi\repository
creating build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GdkPixbuf.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gio.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GLib.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GObject.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Pango.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\__init__.py -> build\lib.win-amd64-3.7\gi\overrides
running build_ext
pycairo: new API
pycairo: trying include directory: 'c:\\users\\dyeaw\\.virtualenvs\\gaphor-s4e8uszi\\lib\\site-packages\\cairo\
\include'
pycairo: found 'c:\\users\\dyeaw\\.virtualenvs\\gaphor-s4e8uszi\\lib\\site-packages\\cairo\\include\\py3cairo.h
'
building 'gi._gi' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\gi
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPY_SSIZE_T_CLEAN -IC:\Users\DYEAW\AppData\Local\Temp\pip-install-18si_3lh\pyg
object -IC:\Users\DYEAW\AppData\Local\Temp\pip-install-18si_3lh\pygobject\gi -IC:\Python37\include -IC:\Python37\in
clude "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-
IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Fil
es (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\
shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\1
0\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcgi\gimodu
le.c /Fobuild\temp.win-amd64-3.7\Release\gi\gimodule.obj -FImsvc_recommended_pragmas.h
gimodule.c
gi\gimodule.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or direc
tory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023
\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

Please help me in installing the dlstreamer python bindings

 

Regards,

Ram prasad

Iffa_Intel
Moderator
53 Views

It seems like the installation of gi in Windows is not straightforward.

Try to refer here: https://www.youtube.com/watch?v=hFyszYbAJnM

and also here(newer article): https://ivf.arm9cs221n.site/pygobject-install-windows.html




Sincerely,

Iffa


Iffa_Intel
Moderator
30 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question



Sincerely,

Iffa


Reply