0

I need to install Python 2.7.x on a TI Sitara ARM processor (based on the BeagleBone Black) running a minimal custom version of Linux. In particular, the OS does not have any package manager, no gcc, no make, etc. Since it is not realistic to create a new image at this point in time, I was thinking of copying Python files from a BeagleBone Black running Debian to the TI Sitara. Does it have any chance of succeeding? Is there a blueprint somewhere that could help me in this endeavor so that I don't miss a file, a symbolic link, etc?

  • 1
    I'm puzzled how it is possible to work on a platform without a C compiler. How was the Python you are trying to install compiled? – Faheem Mitha Nov 11 '14 at 1:26
  • Errr... why would someone use that extremely limited platform if you can't do anything. – Braiam Nov 11 '14 at 1:38
  • 1
    @FaheemMitha en.wikipedia.org/wiki/Cross_compiler – Gilles Nov 11 '14 at 1:41
  • 1
    While it's possible, if you don't have time to build a new image, you don't have time to do this. – Gilles Nov 11 '14 at 1:41
  • @Gilles Ok, a C compiler is still needed. By cross-compiling or otherwise. – Faheem Mitha Nov 11 '14 at 1:43
1

If you have some way of copying tarred files from the Debian running system to the target and untar them there this should not be that difficult.

You could start out with anaylysing the relevant .deb packages installed on the Debian system gather a list of files from dpkg -L for python2.7, python2.7-minimal, etc. but you will miss out on any steps done in the postinstall scripts of the .deb and you have to determine all the relevant ones in the first place.

A much easier solution if you have a similar architecture system with compiler, and one I have used for Solaris systems for which we had no compiler licenses at the time, is to download the source and configure with a unique prefix (on your Debian system):

 wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
 tar xvf Python-2.7.8.tgz
 cd Python-2.7.8
 ./configure --prefix=/opt/python/2.7.8
 make
 sudo make install

Pay attention to the configuration messages, as you might need to install additional (-dev) versions of libraries to enable certain functionality. You would need the (non-dev versions of these) libraries as well on your target system

After that tar up /opt/python/2.7.8, copy it over and untar in the same spot on the target system. Install a link from /usr/bin/python to /opt/python/2.7.8/bin/python.

After that typing python at the prompt should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.