Python Forum
wmi + pypiwin32 + pywin32 + Kodi
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wmi + pypiwin32 + pywin32 + Kodi
#1
hi, new user here, hope you guys can help me. First off:

OS: Windows 10, 64 Bit.
Python: 64 bit.
Packages installed: wmi, pypiwin32 and 64 bit pywin32

My problem: I have a little script which reads my network information. In Python itself it's working.

But I am using it for Kodi (64 bit). Right now it's not an add-on, just a script. And whenever I run the script in Kodi I get this error:

Quote:import win32api, sys, os
ImportError: Module use of python37.dll conflicts with this version of Python.

I have also tried to use Python and Kodi with 32 bit. But the problem persists.

I have absolutely no idea what else I can do. It's been a few exhausting days of countless hours of research. :( Which lead me to this forum. Hope you are able to help me.

Thank you!
Reply
#2
no idea anyone?
Reply
#3
What version of Python are you using?
Reply
#4
Latest stable version: 7.3.4

I'm open to anything. I tried latest Python 2 too.

I also tried the 32 bit versions of latest Python 2 and 3.

Zilch.
Reply
#5
(Aug-22-2019, 07:05 PM)NonSufficitOrbis Wrote: And whenever I run the script in Kodi I get this error:
Are you using Python interpreter that's comes with kodi or do try to us OS Python?
About Add-ons
kodi Wrote:Kodi includes a built-in Python interpreter that allows users to develop add-ons (scripts and plugins) that interface easily and cleanly with the Kodi dashboard.

Basic test to see what's used.
E:\div_code\foo
λ python -V
Python 3.7.3

# Placement of Python interpreter used also python.exe
# When us kodi version of Python,then it will be where they have placed python.exe
E:\div_code\foo
λ python -c "import sys; print(sys.executable)"
C:\python37\python.exe

# Where pip install to
E:\div_code\foo
λ pip -V
pip 19.2.1 from c:\python37\lib\site-packages\pip (python 3.7)
NonSufficitOrbis Wrote:import win32api, sys, os
ImportError: Module use of python37.dll conflicts with this version of Python.
There is no problem to build it with venv virtual environment,to avoid conflict.
I not sure if you should OS Python or there version of Python when use kodi,have you looked into this?
Reply
#6
Thank you snippsat for your reply. I am not too sure how to check whether I am using Kodi interpreter or Python. I copied my script and modules to both 1) C:\python37\lib\site-packages\ as well as to 2) C:\Program Files\Kodi\system\Python\Lib\site-packages with the same result.

python -V and pip -V both point to the same directory. C:\python37\python.exe and c:\python37\lib\site-packages\pip

Hope that helps!
Reply
#7
This is kodi interpreter placement C:\Program Files\Kodi\system\Python\
Go into this folder(cd in) from cmd.
Then python -V to see what version of Python they use.

There will be a folder C:\Program Files\Kodi\system\Python\Scripts,
go into this folder and pip -V.

So using Kodi Python interpreter as you probably should use,place your script in C:\Program Files\Kodi\system\Python\
Then can run from cmd with python my_script.py most be in folder over doing this,now it will use kodi version of Python.

Install the normal way would be using pip that placed in C:\Program Files\Kodi\system\Python\Scripts
When in this folder from cmd pip install something .

You most read there doc about this,they may have some own way of doing this stuff.
Reply
#8
Thank you snippsat.

I did your test, but unfortunately the python -V command only shows what version of python I have installed. It didn't matter what folder I executed the command from. Always just my version, not Kodi's...

I am giving up for now. Nothing works :(

Thanks anyways!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to find PyWin32 for Python 2.1.3 Paul_Newton 9 1,621 Nov-20-2022, 09:15 PM
Last Post: Paul_Newton
  pywin32: Outlook connection ends with 'operation aborted' on one machine tstone 0 2,323 May-03-2022, 04:29 AM
Last Post: tstone
  pywin32 problems catlessness 0 1,183 Apr-01-2022, 01:04 PM
Last Post: catlessness
  pywin32 Illustrator Throwing Exception Error matthewsjc1 7 5,400 Aug-27-2021, 02:43 AM
Last Post: Larz60+
  Has anyone figured out how to get pywin32 into a virtual environment yet? RobR 6 4,613 Jun-04-2020, 01:26 PM
Last Post: RobR
  No module named pywin32 WantedStarling 3 12,105 Dec-07-2018, 09:11 PM
Last Post: Larz60+
  Python Assistance Kodi Addon yuljk 0 3,640 Aug-12-2017, 03:02 PM
Last Post: yuljk
  ISO working example of opening a Microsoft Word document through PyWin32 Orthoducks 1 4,569 Dec-25-2016, 10:12 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020