1

Background

I am trying to run some python code on a beaglebone ( a single board computer with Linux that is similar to a Raspberry Pi). The version of python and the packages preinstalled onto the device are old. Unfortunately, I am unable to connect the device to the internet and therefore am not able to do pip install [packages]. My work around was to directly install the packages onto the device through ssh (winSCP).

Problem

This approach worked well for most packages. It however, does not work well for numpy. I downloaded numpy (first from its github repo and then through SourceForge) and copied it to the proper directory (the same directory which the older version of numpy was previously installed in ). I than ran a python program utilizing numpy but was left with the error:

ImportError: Error importing numpy: you should not try to import numpy from
    its source directory; please exit the numpy source tree, and relaunch
    your python intepreter from there.

Question

question/14570011 answers why this error can arise however I don't understand what it means - is it relevant? and the same reason for why this error arises?

How would I properly install numpy onto this device (keep in mind the device is not connected to the internet)?

Additional Information

James Kl
  • 137
  • 7
  • Have you checked out pip offline installation? https://stackoverflow.com/questions/11091623/python-packages-offline-installation – HammerN'Songs Sep 14 '18 at 20:09
  • Have you made sure that you started from a recent BBB image? http://beagleboard.org/latest-images Also in Debian there are `python-numpy` and `python3-numpy`, both at version 1.12.1 or if you start from a buster BBB image even 1.14.5 – TBR Sep 15 '18 at 09:08
  • btw, I was able to get Internet working over the USB cable from a BBB to windows 7. I used windows internet connection sharing. I set a registry key which made windows internet connection sharing use the 192.168.7.X range which the BBB wants to use. Then I added a default route to the BBB with "sudo route add default gw 192.168.7.1". Then I was able to install numpy with pip. I also had to install wheel first so that it could built it. It then tool quite a while compiling but then I had numpy on BBB. – Joshua Apr 14 '20 at 13:26
  • Here is how to configure the DHCP used by windows connection sharing: https://superuser.com/questions/564103/how-to-change-the-dhcp-range-alloted-through-ics-in-windows-7-to-192-168-1-x-ran I can't remember if I had to add a dns to the BBB too. But here is info on that https://support.rackspace.com/how-to/changing-dns-settings-on-linux/ – Joshua Apr 14 '20 at 13:29

0 Answers0