Makers Blog Archive

Install Miniconda on PLCnext Devices

nilshettig 05 November 2019 min. read
287 views 0 comments

“Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others. Use the conda install command to install 720+ additional conda packages from the Anaconda repository.” This and further information could be accessed on the official Miniconda website. If some packages are not available via PIP, Miniconda could be a solution.

Prerequisites

  • IPKG package manager: IPKG installation tutorial
  • Internet connection on the PLCnext Controller
  • root access to the PLCnext Controller

 

Installation

Install the IPKG package Manager

If IPKG is allready installed, this section could be skipped. The installation is also described in this video.

  1. Sign in at the controller as root. (A description how to add a root-user is described in a manual that could be accessed here.)
  2. Enter
    wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | sh
  3. Open the file with the path settings:
    nano /etc/profile.d/plcnext_app.sh
    and add the line
    export PATH=$PATH:/opt/bin:/opt/sbin.
    This saves the path to the installed ipkg manager permanently.

 

Install bzip

This program is used for compression / decompression and is needed for the installation of the compressed miniconda file.

  1. Sign in at the controller and change to root:
    su -
    The ‘-‘ is necessary to keep the path settings from the signed in user.
  2. Install bzip:
    ipkg install bzip2

 

Download and install miniconda

  1. Change the directory to
    cd /usr/local
  2. Enter:
    wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
    sudo md5sum Miniconda3-latest-Linux-armv7l.sh
    sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh
  3. During the installation you have to confirm the license agreement. Details could be found here: Anaconda license.
  4. It is recommended to change the installation path to
    /usr/local/miniconda
  5. Open the file with the path settings:
    nano /etc/profile.d/plcnext_app.sh
    and add the line
    export PATH=$PATH:/usr/local/miniconda/bin
    This saves the path to miniconda permanently.

 

Testing and extending Miniconda

  1. The installation could be testet if you enter
    conda
    An overview of miniconda should be displayed.
  2. To obtain a wider range of downloadable packages in respect to the processor of the AXC F 2152 add following channel to the conda installation
    class="pln">add channels rpi

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users