qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Add an option to select Python location [OS: Windows] [Search engine]

Open xmha97 opened this issue 2 years ago • 5 comments

Suggestion

Hi, I'm using the PortableApps.com version of qBittorrent. Also, the search engine of qBittorrent needs Python.


I want to use the qBittorrent search feature but don't want to install Python on my computer. Please add an option to qBittorrent app to select the Python location. I need it. Thanks.

Use case

No response

Extra info/examples/attachments

No response

xmha97 avatar Jan 25 '23 09:01 xmha97

just put python3.exe in workdir or add the path to python3.exe in %path% if it doesn't work out, contact the maintainer on PortableApps

b-user avatar Jan 27 '23 11:01 b-user

just put python3.exe in workdir or add the path to python3.exe in %path%

OK, thanks but an option to choose the Python path is more suitable for me.

Why not add Python to the app? In some apps, this has been done. For example, Kodi app is built with C++, but since its add-ons require Python, Python is also included in the Kodi app.

if it doesn't work out, contact the maintainer on PortableApps

PortableApps.com version of qBittorrent, does not make any changes on the apps, for example, it does not add or remove a file or recompile the apps. That's why they won't add Python to this version unless you do.

xmha97 avatar Jan 27 '23 19:01 xmha97

OK, thanks but an option to choose the Python path is more suitable for me.

you're right - an option would be nice

Why not add Python to the app?

it's overkill.

If you use builds from PortableApps, then why don't you ask PortableApps to do it?

PortableApps.com version of qBittorrent, does not make any changes on the apps

this is not entirely true.

b-user avatar Jan 27 '23 19:01 b-user

you're right - an option would be nice

Good 👍

it's overkill.

What do you mean?

this is not entirely true.

PortableApps.com version of apps are built with minimal changes, and most apps don't really change. For example, electron apps are executed as follows:

LosslessCut.exe --user-data-dir="..\..\Data"

xmha97 avatar Jan 27 '23 20:01 xmha97

Gentlemen, for users of PyEnv, this is just a must-have feature, because qBit tightly ignores the fact that pyenv is installed

bropines avatar May 26 '23 14:05 bropines

this feature (in options) is by now urgent... :-\

AnonymouZEE avatar Aug 12 '23 19:08 AnonymouZEE

Any update on this? Adding to PATH doesn't seem to work.

jamesdeluk avatar Jun 11 '24 20:06 jamesdeluk

Any update on this? Adding to PATH doesn't seem to work.

Try this v. 5.0.0 beta

image

@jamesdeluk

bropines avatar Jun 11 '24 22:06 bropines

Looks to work, thanks!

jamesdeluk avatar Jun 12 '24 07:06 jamesdeluk

@xmha97 I think we can close ISSUE since in fact the expected feature has been added.

bropines avatar Jun 12 '24 08:06 bropines

hey guys, @xmha97 @jamesdeluk , for those who don't want to use the beta version, you can just do the following:

cd path/to/qbittorrent
python -m venv venv
mklink python3.exe venv\Scripts\python.exe
mklink pyvenv.cfg venv\pyvenv.cfg

my python executable points to python 3.9 but python3 pointed to python 3.11 (which does not work with qbt), so these commands created a new venv for python3.9 and then created links for the executable and config for the venv. thank you @b-user for pointing out the ability to drop the python3.exe to app dir.

also you need to do it via administrator cmd or just allow your user to write to qbt dir. the whole process takes around a minute :)

also Poershell for some reason can't find and execute mklink, so you have to use cmd.exe

nev3rfail avatar Jun 19 '24 20:06 nev3rfail