Need some pointers to using Python

I know nothing about Python however in Linux I connect to my Sony DPT-CP1 using some Python scripts found on github This is all set in motion by entering “pip3 install dpt-rp1-py”. This does not work in Haiku.

HaikuDepot contains many Python packages and I assume I need to install some of those packages in order to get it working. I am hoping someone more familiar with Python can point me in the right direction.

Thank you

Maybe you need to install the ‘pip’ package from HaikuDepot.

Thanks for responding. I did give that a try. There are a few packages that turn up when searching for “pip” and I installed them, but had no success. I also downloaded the project from github. The project contains instructions for compiling, but following the directions failed producing a “gcc” error.

Installing works out of the box on Linux. I have no idea what Python things are typically installed on Linux compared to Haiku. This python package adds commands to the terminal to allow the user to connect to the Sony DPT and move files to and from the device. It is strictly command line so I assume it should work in Haiku.


My previous experience with Python on Haiku is that for most “non pure-Python” packages, either they are available through HaikuPorts (installable using the HaikuDepot app), or they don’t work. Pure python packages (those which have no requirements for compiled binaries) tend to work ok.

So, besides installing pip from HaikuDepot, you may also need to check the requirements of the package that you are installing. If some package generates an error with pip, check if it’s available on HaikuDepot. If it is, you’re lucky. If it isn’t, someone would need to write a Haikuports recipe (I am not qualified, unfortunately).

I also haven’t find a way to do the usual stuff with virtual environments (like we do with Pipenv on Mac, for instance), but I recognise I haven’t investigated very deeply.

I love both Haiku and Python, but my current impression is that Python experience on haiku is still “half baked”…

I’m betting it won’t work without some changes. For example, it looks like there are hard code system dependent directory paths. But that’s a fairly easy fix. I gather your device is on the ethernet, so that might be all it takes. On the other hand, if somewhere it needs to compile C files (“gcc” error), then it’s probably doing that to for some highly system dependent thing that wouldn’t be supported in Python.

I notice that they’re talking about Python 3. You may need to install that, to run this stuff. The python that ordinarily shows up on Haiku is 2.7 at this point; python3 seems to be a user install option.

Thank you for the informative responses. I will try and look into the matter further. I am just a software user. I am decent at following directions, but know nothing about programming languages. For me getting something to work involves way more luck than it does skill.

I will continue digging into the GitHub package and see what I can do. Thanks again for all the pointers.


Good day,

There is also:
Haiku API bindings for Python, you should take a look at it, depending on your preferences, of course.

I’m starting to like the approach taken by Fedora Silverblue, where user can create a “development toolbox” that does not interfere with the basic install. I messed up my Haiku install by installing all sorts of python versions to try one thing and another, and another… Though most likely my mistake, not Haiku’s.