Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
1,699 Views

installing new python packages

The Python installation in the WW27 build doesn't contain distutils. This makes it difficult to install new python packages as every setup.py script depends on it and you can't install pip, easy_install, etc.

Has anyone successfully gotten around this? And could future builds include distutils in the Python installation to make this simpler for the inexperienced? 🙂

Tags (1)
14 Replies
Highlighted
Honored Contributor II
8 Views

Re: installing new python packages

I installed pip right away, but that required a few missing python modules which you only get if you build your image yourself. They're built by default, so I'm not sure why they aren't installed right away (just some part of those).

I was a bit in a hurry so I haven't written down which modules I installed.

I'm going to build a new image based on WW31 release tonight, after that I should be able to repeat that and share the list of necessary modules.

Highlighted
Employee
8 Views

Re: installing new python packages

I'll ask for distutils. It's a pain not to have pip.

Highlighted
Honored Contributor II
8 Views

Re: installing new python packages

So here goes the list of Python packages needed to install pip using standard http://pip.readthedocs.org/en/latest/installing.html get-pip.py:

python-pkgutil_2.7.3-r0.3_core2-32.ipk

python-audio_2.7.3-r0.3_core2-32.ipk

python-image_2.7.3-r0.3_core2-32.ipk

python-email_2.7.3-r0.3_core2-32.ipk

python-netserver_2.7.3-r0.3_core2-32.ipk

python-xmlrpc_2.7.3-r0.3_core2-32.ipk

python-distutils_2.7.3-r0.3_core2-32.ipk

python-ctypes_2.7.3-r0.3_core2-32.ipk

python-html_2.7.3-r0.3_core2-32.ipk

python-json_2.7.3-r0.3_core2-32.ipk

python-compile_2.7.3-r0.3_core2-32.ipk

python-misc_2.7.3-r0.3_core2-32.ipk

python-numbers_2.7.3-r0.3_core2-32.ipk - just added, I've updated the post. Without this one, pip was always failing with "setuptools must be installed to install from a source distribution" even though setuptools are already there.

+ many modules require these to install

python-unittest_2.7.3-r0.3_core2-32.ipk

and itsdependency

python-difflib_2.7.3-r0.3_core2-32.ipk

And only after that you'll be able to do this:

root@myed1:~# python get-pip.py

Downloading/unpacking pip

Downloading pip-1.5.6-py2.py3-none-any.whl (1.0MB): 1.0MB downloaded

Downloading/unpacking setuptools

Downloading setuptools-5.4.2-py2.py3-none-any.whl (528kB): 528kB downloaded

Installing collected packages: pip, setuptools

Successfully installed pip setuptools

Cleaning up...

root@myed1:~# pip --version

pip 1.5.6 from /usr/lib/python2.7/site-packages (python 2.7)

All in all, I'd really recommend just to install all the modules that are produced by the build right away. That's "batteries included", right? Or at least provide a package repo.

Highlighted
Employee
8 Views

Re: installing new python packages

Hi AlexT, I was hoping you could include ftdi_sio in a future build as well. I remember using your repo for Galileo (which had ftdi_sio), and it was very helpful. Or, is there some way I could get access to kernel headers to compile it myself?

James

Highlighted
Honored Contributor II
8 Views

Re: installing new python packages

Replied in your new thread you've created.

0 Kudos
Highlighted
Employee
8 Views

Re: installing new python packages

Where are these ipk packages located?

(I have ftdi_sio working now from building the source, thanks)

James

0 Kudos
Highlighted
Honored Contributor II
8 Views

Re: installing new python packages

You're welcome

They are in edison-src/build/tmp/deploy/ipk/core2-32 (assuming the default dir layout).

EDIT: By the way - here are all the modules less a couple of huge staticdev ones and python-dbg and python-tests, which are irrelevant.

You can install them by copying to the board and running "opkg install ". I've tried listing the modules necessary for pip in the order of dependency, so you should be able to install them just one by one.

0 Kudos
Highlighted
Employee
8 Views

Re: installing new python packages

James, can you share how you compiled ftdi_sio from source? I get missing headers (linux/init.h, etc.). Thanks!

0 Kudos
Highlighted
Employee
8 Views

Re: installing new python packages

Latest software image now supports distutils

0 Kudos
Highlighted
Beginner
8 Views

Re: installing new python packages

Hey Guys I installed all the modules but still having this

Downloading/unpacking pip

Cannot fetch index base URL https://pypi.python.org/simple/ https://pypi.python.org/simple/

Could not find any downloads that satisfy the requirement pip

Cleaning up...

No distributions at all found for pip

Storing debug log for failure in /home/root/.pip/pip.log

seems yocto doesn't support HTTPS?

0 Kudos
Highlighted
Beginner
8 Views

Re: installing new python packages

Is the latest software support HTTPS?

0 Kudos
Highlighted
Employee
8 Views

Re: installing new python packages

So, nearly a month later, still no pip install on Edison?

0 Kudos
Highlighted
Beginner
8 Views

Re: installing new python packages

pip is working now, the biggest issue for us right now is scipy, always have some problem during compiling, do you have any idea or has anyone done this before?

0 Kudos
Highlighted
Employee
8 Views

Re: installing new python packages

0 Kudos