Skip to content

Instantly share code, notes, and snippets.

@danielfm
Last active March 6, 2020 22:49
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielfm/f62686f488ad2e5df8bb to your computer and use it in GitHub Desktop.
Save danielfm/f62686f488ad2e5df8bb to your computer and use it in GitHub Desktop.
How To Install FlexGet on OpenELEC 4.0

Instructions

The first thing to do is create a file ~/.pydistutils.cfg with the following content:

[install]
install_lib = ~/py-lib
install_scripts = ~/bin

It's also a good idea to set PYTHONPATH variable in ~/.profile:

export PYTHONPATH=~/py-lib

Now we can proceed and install easy_install:

$ cd ~
$ mkdir py-lib bin
$ curl http://peak.telecommunity.com/dist/ez_setup.py > ez_setup.py
$ source .profile
$ python ez_setup.py

Before installing flexget, some required libraries try to import a module unittest which is not provided by OpenELEC's Python distribution.

To "fix" this, let's install the old pyunit:

$ bin/easy_install pyunit

Finally we can proceed and install FlexGet:

$ bin/easy_install flexget transmissionrpc

All done.

@fredo55
Copy link

fredo55 commented Nov 5, 2014

Hi, after $ python ez_setup.py I got this message:

OpenELEC:~ # python ez_setup.py
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 30] Read-only file system: '/usr/lib/python2.7/site-packages/test-easy-install-1207.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

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

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

Any suggestion how to proceed?
openelec 4.2.1

@fredo55
Copy link

fredo55 commented Nov 24, 2014

Thanks for replying, I started by your suggestion, now I'm using 4.2.1
Sorry if this is not at the level of your post but I don't have much experience with linux. Could you elaborate on how to create (where) a directory where I'll be permitted to do this tasks?
When I tried to create a file always had no permissions.
Starting putty I got this:
OpenELEC:~ # ls
backup downloads lost+found pictures screenshots videos
bin music py-lib tvshows

My external usb drive is:
OpenELEC:/var/media/My Passport

@zilexa
Copy link

zilexa commented Dec 30, 2014

If I would follow your guide to the line, the "~" folder is /storage because that is the default dir when you log in via SSH. It does not seem correct to install it in the storage folder. Am I right?

@zilexa
Copy link

zilexa commented Dec 30, 2014

I cannot run command "source .profile" because .profile does not exist. I am on OpenElec 5.0

I did a search for .profile, both manually (checked all top folders and listed their contents via ls -as) and using the find command but I cannot find the directory this guide is based on because I cannot find ~/.profile. It definitely does not exist in /storage.

@ggiannotti
Copy link

On 5.0 i'm stuck with this:

OpenELEC:~ # python ez_setup.py
Traceback (most recent call last):
File "ez_setup.py", line 278, in
main(sys.argv[1:])
File "ez_setup.py", line 210, in main
egg = download_setuptools(version, delay=0)
File "ez_setup.py", line 139, in download_setuptools
from distutils import log
ImportError: No module named distutils
OpenELEC:~ #

any ideia how to fix it?

@zilexa
Copy link

zilexa commented Jan 2, 2015

same here also stuck! I tried installing setuptools-10.1 manually but got the same error.

@andreferreirav2
Copy link

Same thing as calvinbr I'm getting the error "ImportError: No module named distutils" in OpenElec 5.0.8
Any fix on this?

@gkanyog
Copy link

gkanyog commented Oct 15, 2015

Hi!

When I type this on OE 5.0.8:

python ez_setup.py

I get the following text (same like calvinbr)

Traceback (most recent call last):
File "ez_setup.py", line 278, in
main(sys.argv[1:])
File "ez_setup.py", line 210, in main
egg = download_setuptools(version, delay=0)
File "ez_setup.py", line 139, in download_setuptools
from distutils import log
ImportError: No module named distutils

How can I solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment