Can beagleboard run python or Ruby programs? - python

I hi have just ordered a couple of beaglboards for experimenting. I know that it can rub Ubuntu and many other flavors of linux.
Does that mean it can run all the trivial software that run on Ubuntu?
Will the python and ruby interpreters work just the way they work on PC ?

The Beagleboard can run both of them, but you may have to compile the interpreters from source. And don't expect the performance of a desktop.

I purchased a BeagleBoard-xM recently, built and installed an Angstrom distribution with a basic toolchain generated by the Narcissus website.
Angstrom uses the opkg package manager. After getting the base system up, all I had to do to get Ruby up was to run
opkg install ruby
and ruby / irb ran fine.
I was also able to get ruby gems installed from the tar on gemcutter and build some gems I needed for a project I was working on e.g., sinatra.

The interpreters do not need to be compiled from source, as the Ubuntu arm distribution has python in its repository as a deb. I was able to write my python scripts on my Ubuntu box and transfer them to the beagleboard without any changes. Performance so far has been surprisingly good, as I'm using the python script as a bridge between the real-time sound processing/synthesis language supercollider and a motor control board that communicates over USB-serial.

The Angstrom Linux distribution (which runs on the Beagle Board) has binary packages for both Python and Ruby. I've worked on an application that uses Python and PyGTK. Never had any problems.

Related

Cross Platform Python Executable - Mac & Windows?

I used pyinstaller to create an executable file (Desktop GUI). I am on Windows, and the person I am sending it to is on Mac.
I was under the impression that pyinstaller was cross platform, but the Mac user gets an error when trying to run the app. What are my options for distributing my GUI for both Windows and Mac?
I have not been able to find a straightforward answer and do not have a Mac to test with. I saw Inno Setup, but haven't found anything saying whether or not it's cross platform.
I need to create a script that can run both Windows and Mac. I am also looking for an easy way to send it electronically.
I have no knowledge of Python but after a quick serach on the internet came up with this which might help you.
A few months ago I went through this process (rather painstakingly I might add) to deploy a simple Xamarin Cross Platform App. In my own experience I have learned that the macOS has very strict rules about how software is to be packaged for deployment on a computer.
If you are using Visual Studio for Mac it will automatically build a packaged installer for you. But, you do have to purchase (at an yearly cost) a Developer ID.
Then, you create specific provision profiles for your application and these are used along with your developer ID to sign your packaged installer. I found it somewhat complicated!
Finally, you follow a procedure via the console on the mac to submit your package for an automatic scan. This is referred to as getting your package notarized (link to a SO question about that process).They provide you a result that then gets stapled to the package.
It is like a double signing. Once this is done then the package can be installed by users using the macOS.
An alternative is that the user run a instance of Windows by using a software package called Parallels. I have to say it is very good and I did enjoy my trial of the software, You can fire up Windows from inside the macOS (no need to reboot) and since it is Windows you can simply run your stahdard installers.
In summary, for the macOS, if you do not correctly sign your package with a developer and application ID, and don't get it notarized and stapled the operating system will throw it back out at you and not run it.

How do I get Python code to run in RStudio? No Python installed in the system

I'm working on a research project where the data is stored in a remote Windows desktop. The desktop does not have Python, it only has Rstudio, but most of the research conducted in this topic was in Python. I want to benchmark already existing implementations, but I can't run the code on the data because there's no Python and this will not change. As far as I understand, tools like reticulate still need an underlying Python interpreter in the system to work and I am not allowed to do that.
Has anyone come up with a smart solution that does not involve me manually translating the python code to R? Any R packages that can read python? Any other out-of-the-box ideas on how to get that code to run on the data?
Can't install Python on Windows? Just Use WinPython
WinPython is a free open-source portable distribution of the Python programming language for Windows 8/10 and scientific and educational usage.
Since it is portable, it is a zero install option. This is probably the best option for you.
https://winpython.github.io/
Once you have WinPython on the machine, if you want to use it with RStudio, you'll need to configure reticulate to use it.
Say you have (1) the remote Windows Desktop that does not have Python and (2) the local computer you work on.
Use the remote Windows Desktop (1) as a git repository, clone that repository on your local machine, make changes to it and run locally using Python, then submit the code to the remote repository again.

Deploying Python application+dependencies on OSX from Ubuntu

Background:
I'm writing a non-commercial application in Python, that uses wxPython, and depends on pyPortMidi and SciPy (both available on PyPi). I would like to share this with a small circle of Mac users - who live in different countries.
I work on Ubuntu, and don't have access to OSX systems for testing.
What I'm looking for:
A end-user friendly means of deploying my application, especially given the dependencies
What I've found so far:
Like Ubuntu, OSX comes with it's own Python bundled
This answer
suggests py2app. However, it's not clear from the
documentation
whether I can build an OSX app on an Ubuntu platform. Ditto with cx-Freeze.
Specific Questions:
Can I use py2app to build an OSX app on Ubuntu? And will it automagically include the above dependencies, or do I need to specify it somehow?
If not, can I write some sort of OSX script that will install the package dependies (using easy install, perhaps), painlessly on the end-user system? I haven't used distutils before, and I'm unfamiliar with OSX scripting, so any pointers would be appreciated!
Apologies for the noob questions, and thanks in advance.
You can use py2exe for Windows
Freeze on Linux and as you say py2app for Mac
py2app doesn't work on non-mac machines. As suggested by #victor-castillo-torres, have a look at Freeze, as also suggested in the linked mailing list.
Py2app only works on OSX systems, the code does not support building
bundles for other platforms than the one it is running on. That
is, py2app uses the currently running python installation to build a
depedency graph and copies the files mentioned in that graph to the
application bundle.
From the point of view of building script to install the dependencies
for your script OSX is just like any other Unix system, but with
different GUI libraries. A script that uses easy_install to install
dependencies could be made to work, although I don't know if all your
dependencies are easily available that way (in particular wxPython).

Installing PyGIMP on Windows

On the web, I can find various example on gimp scripting with python.
http://www.jamesh.id.au/software/pygimp/
http://www.gimp.org/docs/python/pygimp.html
We need to import the gimpfu module to get the examples to work. Where can we get the installer of PyGIMP on Windows? It seems the project is dead and the links are broken.
In order to develop Gimp scripts using Python-fu I have followed gimp users article, In short you need to download & install the following:
Python 32-bit from here.
All in one 32-bit from here.
Gimp 2.6 32-bit from here.
Then you need to create your-plugin.py file in C:\Users\MyUsername.gimp-2.6\plug-ins
P.S: Restart your gimp after adding code or modifying your register() function in order to take effect each time.
PyGIMP is part of GIMP (GNU Image Manipulation Program) and can only work in together with it. For Linux distributions it is often found in a different package - but its code lies inside the GIMP code source, and on Windows it is installed alongside GIMP.
As far as I know, the GIMP 2.8 installer for Windows should come with all dependencies (Python interpreter included) for it to work - else all you need to do is to have the dependencies for it to work installed before installing GIMP.
These should be:
Python 2.5, 2.6 or 2.7
Python-gtk
Pycairo
And finally GIMP itself.
Them, you can't just use pygimp as a standalone Python module - it has to be launched from within GIMP to be able to use the program libraries and code. It is relatively easy to create a script that would respond to xmlrpc or similar method, to stay quietly running awaiting requisitions from external scripts to process images with GIMP, tough.

Distributing python on Mac, Linux, and Windows using cx_freeze: can I generate all apps from one platform?

I'm setting up a scripted build of a cross-platform python app (Python 3) and I'd like to create all the distributables from linux. Is that possible?
Short answer: no
I've been doing something similiar recently (using cx_Freeze with Python 3). If you set up Python inside Wine, you can generate a Windows build, but I had to copy some DLLs in before it worked properly (cx_Freeze calls a Windows API function that's not implemented in Wine). I've not run into any way of packaging applications for Macs without actually having a Mac.
Perhaps someone should set up a community build service so people could build distributables for different platforms for each other. That doesn't get round the problem of testing, though.

Categories

Resources