Page 1 of 6
Missing Python Runtime (search)
Posted: Thu Oct 12, 2023 4:31 pm
by bitcoin
Cfr.
viewtopic.php?t=9196
I'm in the same boat. When I go to qbittorrent: view: search I get a popup that the Python libraries are missing and it proceeds to install python 3.10.11. But whatever PATH statement (user/system) I add, qB keeps insisting the libraries are missing.
I just did a fresh installation (removed all settings and torrents) and went to the latest RC2 (v4.6.0). Before that I was on the latest 4.5.? stable branch.
What else is there left for me to try? I removed all Python versions with iobit, had qB install its version and still it complains. I also downloaded the latest Python version and installed that one. Still, qB insists Python is not to be found on my system

Also see:
https://stackoverflow.com/questions/508 ... 0#52913040
Running Win 11 for what it's worth... Disabling Avast made no difference (nor should it have)
Please advise?
Devnullius
Code: Select all
C:\Windows\System32>py
Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Re: Missing Python Runtime (search)
Posted: Fri Oct 13, 2023 5:55 am
by bitcoin
Re: Missing Python Runtime (search)
Posted: Fri Oct 13, 2023 6:25 am
by Peter
What if you check the qBittorrent log?
View -> Log -> Show
Then on top bar, Execution Log.
Re: Missing Python Runtime (search)
Posted: Fri Oct 13, 2023 9:12 pm
by bitcoin
Nothing :/
Code: Select all
13-10-2023 23:11 - Python not detected
13-10-2023 23:11 - Python not detected
13-10-2023 23:10 - Python not detected
Re: Missing Python Runtime (search)
Posted: Fri Oct 13, 2023 9:51 pm
by Peter
Weird. See "foreignapps.cpp":
https://github.com/qbittorrent/qBittorr ... gnapps.cpp
You can see how it's looking for Python at the bottom of the file especially.
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 7:44 am
by bitcoin
Pastido wrote: Sat Oct 14, 2023 3:27 am
bitcoin wrote: Thu Oct 12, 2023 4:31 pm
It's because they put windows 11, you have to change the whole system.
No idea what you are trying to say... I think you're just spamming? Or is it a language barrier?
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 7:51 am
by bitcoin
I came across that page before but I have no idea what to do with it... Nor what you'd want me to see there :) That file's also not found on my C: drive. Could you help me along? Thanks!
Devvie
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 11:15 am
by Peter
bitcoin wrote: Sat Oct 14, 2023 7:51 am
I came across that page before but I have no idea what to do with it... Nor what you'd want me to see there

That file's also not found on my C: drive. Could you help me along? Thanks!
Devvie
So if you go down, you can see how it checks for Python.
( My Python is in : C:\Users\peter\AppData\Local\Programs\Python\Python39\python.exe )
I get this in log:
Code: Select all
10/14/2023 1:13 PM - Python detected, executable name: 'python', version: 3.9.13
If you open command line, and type "python", what do you get?
I get this:
Code: Select all
C:\Users\peter>python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 3:18 pm
by bitcoin
Nothing in the logs about Python until I click View... Yes, I want to install Python. Python setup will flash quickly (it's installed already so it's done quickly) and then nothing happens. I can repeat that cycle over and over. It says it's not installed. And as shown, if I do python or py at the command prompt, I get this:
User command prompt:
Code: Select all
C:\Windows\System32>python
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
User command prompt as an Administrator:
Code: Select all
C:\Windows\System32>python
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
The code block in my previous reply reflected the old PATH statements, sorry for that (I conveniently ignored to reboot: by now I've actually rebooted and the 3.10 version reflects the order of the PATH statements). Still, qB insists Python isn't installed.
Code: Select all
C:\Windows\System32>echo %PATH%
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\Gebruiker\AppData\Local\Microsoft\WindowsApps;C:\Users\Gebruiker\AppData\Local\Programs\Microsoft VS Code\bin
Code: Select all
C:\Windows\System32>where python
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310\python.exe
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\python.exe
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\Gebruiker\AppData\Local\Microsoft\WindowsApps\python.exe
Code: Select all
14-10-2023 17:29 - Python not detected
14-10-2023 17:29 - Python not detected
14-10-2023 17:12 - Python not detected
14-10-2023 17:12 - Python not detected
Le sigh :)
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 3:41 pm
by Peter
What's weird is, your CMD comes up in System32 as if you ran it as Admin.
Why?
Mine:
Code: Select all
Microsoft Windows [Version 10.0.22621.2428]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user>where python
C:\Users\user\AppData\Local\Programs\Python\Python39\python.exe
C:\Users\user\AppData\Local\Microsoft\WindowsApps\python.exe
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 5:41 pm
by bitcoin
Task Manager: Run task... cmd --> starts in system32
Task Bar: Find: cmd: open program cmd.exe --> starts in User
Nice catch :)
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 5:42 pm
by bitcoin
The only thing different between us is the 3.9 python version... but qB itself wanted to install 3.10.11... So what's THAT about? :)
I'll put 3.9 at the top of my PATH statements. And reboot ;p See if that helps.
Re: Missing Python Runtime (search)
Posted: Sat Oct 14, 2023 5:58 pm
by bitcoin
Nope. That didn't help either.
Code: Select all
C:\Users\Gebruiker>python
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Code: Select all
C:\Windows\System32>where python
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310\python.exe
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\python.exe
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\Gebruiker\AppData\Local\Microsoft\WindowsApps\python.exe
C:\Windows\System32>echo %PATH%
C:\Users\Gebruiker\AppData\Local\Programs\Python\Python39\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\Gebruiker\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\Gebruiker\AppData\Local\Microsoft\WindowsApps;C:\Users\Gebruiker\AppData\Local\Programs\Microsoft VS Code\bin
Re: Missing Python Runtime (search)
Posted: Sun Oct 15, 2023 1:46 pm
by bitcoin
Looks like I'm poop out of luck?

Re: Missing Python Runtime (search)
Posted: Sun Oct 15, 2023 3:29 pm
by Peter
bitcoin wrote: Sun Oct 15, 2023 1:46 pm
Looks like I'm poop out of luck?
So it's... tough.
- There is a whole block of code that checks registry, local files, path, everything. But it fails for you.
- The code is littered with qDebug() calls but that won't show up in cmd, nor in logs, and even DbgView fails to show it.
- Running it myself in Qt Creator would make no sense since it works for me.
- So I'd have to sprinkle print() calls (programmer's best tool) around the python detection code and then make a new WIN32 build for you to run.
- Then you could run it from CMD and we could figure out why it all fails.
(I don't know why it writes into qDebug() and not into the qBt logger or at least console print.)
So anyway, I'd have to set up a full win32 build env but I don't have enough space on my SSD which means it'd take me legit 5-6 hours to install it all on my HDD in Virtualbox. I am intrigued by the problem, I just can't invest that much time into it right now. I'll try to make it happen later though.
Unfortunately the project is not built via Github directly, so I can't just fork it, change it, build it.
AFAIK this is latest guide:
https://github.com/qbittorrent/qBittorr ... c-linkage)
(ok maybe I'll do it soon.. I don't know I am having an internal battle about this lol.)
Also we may end up with a build that works perfectly and only the official will fail.
Give me a few hours.