How to Install Python

When I tried to activate the search engine in qBittorrent, I get a notification: “Python is required to use the search engine . . .”

I need instructions on how to install Python.

Please help.

1 Like

HI Tyro65,

if you are under haiku, go to the haikudepot and look for python and install it.

I hope it helps you.

Regards lorglas

1 Like

t has been a while since I did a new installation for Haiku, but python should be one of the packages that comes pre-installed in the image.
If you don’t have it, try “pkgman install python3.10” (which is default now) in Terminal.

1 Like

Not long ago, qBitTorrent added a setting so the user can specify the Python’s path. Seems auto-detection was failing for some users.

Sadly, it doesn’t seems like that change made it into the latest 4.6.0 release of qBitTorrent, so if it keeps failing on Haiku, we’ll might want to either wait for a release that includes that commit, or we’ll need to do some patching (for reference: on this file, most likely).

1 Like

Not seeing that settings in the one I installed with pkgman earlier (4.3.1-3).

EDIT: works ok here?

1 Like

Thanks, but it was not in there.

Open a Terminal window.

Type: pkgman install python3.10 if you’re running the 64 bits version of Haiku, or use pkgman install python3.10_x86 if you’re using the 32 bits version instead.

BTW, are you running beta4, nightlies, or something older? (maybe try doing pkgman full-sync, to make sure all your packages are up to date).

1 Like

BTW, It looks like that recent nightlies have removed support for python2 at all, so if you are looking for it, it’s not there anymore (even in the repo).

This is sad for me because all my ptyhon2 Be apps I wrote won’t work anymore… and there’s no possible porting to Haiku API for python3… :frowning:

And I refuse to write Qt apps in Haiku
…just hoping in a brighter future…

Python2.7 has seen EOL a long time ago afaik (python3.6 up to python3.8 have been removed also a while back), this was also announced here on the forum.
Maybe you could raise a voice at haikuports about this?


Not sure that would help, I REALLY doubt we’ll revive Python 2.x. The issue is that @TmTFx, AFAIK, was using Bethon, and that project never got ported to Python 3.x. Maybe ask @donn nicely about that? :slight_smile:

(Some months ago I tried updating Bethon to Python 3, but quickly got stuck due to my poor programmings skills, and lack of understanding of both Bethon’s internals’, and changes in Python’s C API between 2.x and 3.x).

In any case, it should be possible for @TmTFx (or anyone else that needs it) to create a local build/package for Python 2.7.18, using the recipe/patchset before they were removed, no? (or at least use that patchset/recipe as a guide on how to build it from sources locally).

@TmTFx, also, while still pretty early in development… maybe is worth considering using (and contributing to if you can)?

1 Like

Oh no. That particularly bad for you.

Thanks, BiPolar. I’ll check it out.

Thanks, TmTFx.

I will try using pkgman to install python 3.10, Begasus, as soon as I can get back to running Haiku-OS.

1 Like

I am sure not going to make any promise on that.

Back when I cared about Python and was somewhat troubled by the prospect of my programs perpetually exposed to this incompatible version problem, I was informed that the right way to install a Python program, is with its own private Python interpreter and all the libraries. I’m not making this up, this was recommended standard practice. This interpreter would live with your application, of course, in terms of the install directories etc.

Python2 packages are retained on the Haiku R1B4 and previous nightly releases. Also, the haikuports repos for those distros.

Retain copies of Haiku R1B4 and/or nightlies before the python2 removal. You can adjust an updated version undoing the default python3 replacement.

We can post links if needed.

It sure does complicate the construction and porting of programs.

Thanks for the replies, I’m trying to install Haiku-PyAPI under haiku-32 bits (walter). It needs tu use gcc greater than 4.8. How can I tell Jam to use the non default gcc (2.95) (i.e. not using /bin/gcc and use instead /bin/x86/gcc)?

Not sure about jam, on 32bit you can switch compiler in Terminal with setarch x86 which gives you gcc13, typing exit in the Terminal brings you back to gcc2.

Haiku-PyAPI author here, have you tried installing from HaikuDepot?