How can I install numpy and pandapower on the RASPBIAN JESSIE LITE Minimal image based on Debian Jessie? the one without the GUI. And how can I install Pip and miniconda on it as well?
By default, Jessie Lite for Raspberry Pi have python 2.7 installed but does not have pip/setuptools/wheel installed. To install pip, run:
sudo apt-get install python-pip
This will install setup tools and wheel along with pip.
You can then use pip to install packages you will need. To install NumPy:
pip install --user numpy
sudo pip install numpy
I recommend using the
--user flag to pip (without using
sudo pip). This will install packages for your local user, and does not need extra permissions to write to the system directories.
I recommend installing numpy via apt-get not via pip as the latter needs to compile the lib on the Pi and that is no fun. Not sure about pandas but I would expect something similar. So use:
sudo apt-get install <program name or abbreviation>
With program name being something like 'python-numpy'.
Pip on the other hand should already be installed if Python is available.
The MagPi, Issue 64 reports about piwheels:
Pi Foundation Community Manager Ben Nuttall has released piwheels, a set of pre-compiled Python modules that reduces the install time from tens of minutes to a couple of seconds. Pip is the best way to install Python packages, as it grabs the very latest version. However, often these packages “have been implemented in C and require compilation,” Ben explains. Compilation takes ages, however – installing the NumPy package on a Pi 3 can take over 20 minutes.
The Python community solved this problem a while back with ‘wheels’, pre-compiled versions of packages for common hardware and software combinations. However, until Ben’s project, there were no wheels for a Pi running Raspbian. Enter Ben with his epic project to pre-compile all 750,000 wheels for the Raspberry Pi. With some help from SQL expert Dave Jones (@waveform80), and the Raspberry Pi Foundation’s web host Mythic Beasts (mythic-beasts.com), there are now over 670,000 wheels for more than 96,000 packages. NumPy now installs in seconds using the command sudo pip3 install numpy.
So now one could use pip to install numpy and pandas without long compilation times simply by:
sudo pip3 install numpy