4 Replies Latest reply on Jan 12, 2015 9:19 AM by AllynH

    Adding Python Modules to the Galileo

    AllynH

      Hi all,

       

      I'd like to add some Python modules to the Galileo, however I can't seem to get them installed without apt-get...

       

      For example with the Python installer "pip" you'd use: sudo apt-get install python-pip

      Or for SetupTools, you'd use: sudo apt-get install python-setuptools

       

      There are a number of Python modules I'd like to work with,

      Any ideas how I'd get them using the opkg route?

        • 1. Re: Adding Python Modules to the Galileo
          JPMontero_Intel

          Hi AllynH

          Well if the module doesn’t have requirements just like Pyserial you can install it manually. You download the module extract it on your SD card, go to the folder which contains the module and you can install it by using the command python setup.py install. If it have dependencies I recommend you to check this post https://communities.intel.com/thread/52633 I think it might be what you are looking for.

           

          Regards
          JPMontero_Intel

          • 2. Re: Adding Python Modules to the Galileo
            AllynH

            Hi JPMontero,

            Sorry I haven't replied - I just got notified when you marked this as answered!

             

            Just to clarify are you saying I should:

            • Plug SD card into my laptop.
            • Download library file on laptop.
            • Unzip library file to SD card.
            • Put SD card back into Galileo and boot.
            • cd to library directory and run: python setup.py install

             

            I have very little experience installing Python modules and I would like to install, pip, python-setup tools and a few other libraries.

            • 3. Re: Adding Python Modules to the Galileo
              JPMontero_Intel

              Hi AllynH

               

              That is correct, but that work with some modules that don’t have dependencies. I would highly suggest you to use opkg for installing other packages. Take a look at the post I suggest you above, in case you are not familiar with opkg and AlexT repo have a lot of python modules that might be useful to you.

              Regards,
              JPMontero_Intel

              • 4. Re: Adding Python Modules to the Galileo
                AllynH

                To install these packages - here's what I did:

                • Plug SD card into my laptop.
                • Download library file on laptop.
                • Unzip library file to SD card.
                • Put SD card back into Galileo and boot.
                • cd to library directory and run: python setup.py install


                Example:

                cd /usr/lib/python2.7/site-packages/

                python ../pip-1.5.6/setup.py install