General NAS-Central Forums

Welcome to the NAS community
It is currently Fri Nov 24, 2017 5:26 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Mon Sep 02, 2013 8:51 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
Latest release on slacker br2 repo: python-2.7.9-arm-1
Prerequisites: FFP 0.7-arm, updated slacker sites with Uli's uwsiteloader.sh script.
The first thing you need is to install python-2.7.* and tools for managing python packages (pip-6.0.8 and setuptools-14.3.1):
Code:
slacker -UuiA br2:python/

Secondly, install dependencies for python built-in modules:
Code:
slacker -uiA br2:{expat,gettext,libiconv,libffi,ncurses,readline,gcc/gcc,gcc/gcc-solibs,uClibc,uClibc-solibs,sqlite,openssl} uli:{gdbm,zlib} s:{db5,bzip2}

Thirdly, gcc compiler with dependent libraries is required for "pip install" command, to compile C code for some packages:
Code:
slacker -uiA br2:{gcc,gcc-solibs,gmp,mpfr,mpc,autoconf,automake,binutils,make,m4,pkg-config,libtool,check,dejagnu,expect,tcl,help2man,flex,texinfo,bison,intltool,libiconv,gettext,ncurses,perl-modules,uClibc,uClibc-solibs,findutils,patchutils} s:{perl-5.*,gawk,diffutils,gzip,bzip2,coreutils,grep,patch} mz:kernel_headers uli:zlib

Further steps to install any package from PyPI (The Python Package Index-a repository of software for the Python programming language-https://pypi.python.org/pypi) are very simple. Pip has dependency packages installing mechanism. It will automatically download and install all dependency python packages as necessary for first requested package.

Install latest version of package:
Code:
pip install PackageName

Install exact version of package
Code:
pip install PackageName==1.0

List what packages are outdated:
Code:
pip list -o

Upgrade a package:
Code:
pip install --upgrade PackageName

Uninstall a package:
Code:
pip uninstall PackageName
You will be asked to confirm uninstall process-Proceed (y/n)? y

Uninstall a package without confirming:
Code:
pip uninstall -y PackageName

Show what files were installed:
Code:
pip show --files PackageName

Search for package on PyPi:
Code:
pip search PackageName
Personally I prefer go to PyPI web page-https://pypi.python.org/pypi directly and search for packages there.

Available commands:
Code:
pip --help

Help on command:
Code:
pip command --help

How to test python modules from newly installed python packages?
Python module name usually are the same as package name, but not necessary. You can find actual module name on the list of all python modules:
Code:
pydoc modules

Check, do the installed pyhton module correctly functioning:
Code:
python -c "import ModuleName"
Blank row output on screen is good, error output is bad.

More info about pip usage can be found on http://www.pip-installer.org/en/latest/usage.html
Differences between pip and setuptools (easy_install) are discussed here: http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install


Last edited by barmalej2 on Wed Oct 08, 2014 9:05 am, edited 24 times in total.

Top
 Profile  
 
PostPosted: Mon Sep 02, 2013 9:17 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
HOWTO: Upgrade from previous mine release-python-2.7.5-arm-0.txz

If you used my previous build and want to upgrade, this info will be relevant for you. Previous build was made with UCS4 support and the current one is with UCS2. It is the main reason, why all externally installed python packages (with setuptools-easy_install or pip tool doesn't matter) are incompatible with new version of python. Uninstall of external python packages is required.

Create a list of installed external python packages for pip uninstall command:
Code:
pip freeze|xargs

Exclude from this list package wsgiref (it is the only one prebuild python package), select and paste list to pip uninstall command:
Code:
pip uninstall -y packagename1==version packagename2==version

After uninstall of packages, you can proceed to upgrade python, following the steps from first post and after upgrading python, pip and setuptools, install packages again using the same list.

Note:
The wsgiref package is a part of the Python standard library. Currently it is the only one standard library package, that includes package metadata, so it is the only one standard library package, whose presence pip reports. Actually, it is an issue of python and looks like solved in version 3.3 http://bugs.python.org/issue12218


Last edited by barmalej2 on Sat Nov 09, 2013 9:01 am, edited 8 times in total.

Top
 Profile  
 
PostPosted: Sun Sep 08, 2013 1:40 pm 
Offline
User avatar

Joined: Tue Feb 05, 2013 6:46 am
Posts: 44
Location: Germany
hello barmalej2,

I get this message from pip

Quote:
root@NSA325:~# python -V
Python 2.7.5


Quote:
root@NSA325:~# pip search flexget

/ffp/bin/python: symbol 'XML_SetHashSalt': can't resolve symbol

/ffp/bin/python: symbol 'XML_SetHashSalt': can't resolve symbol

FlexGet - FlexGet is a program aimed to automate downloading
or processing content (torrents, podcasts, etc.)
from different sources like RSS-feeds, html-pages,
various sites and more.
uguu - generate Flexget config files

Quote:
root@NSA325:~# pip install --upgrade glances

/ffp/bin/python: symbol 'XML_SetHashSalt': can't resolve symbol

/ffp/bin/python: symbol 'XML_SetHashSalt': can't resolve symbol

Requirement already up-to-date: glances in /usr/local/zy-pkgs/ffproot/ffp/lib/py
thon2.7/site-packages
Requirement already up-to-date: psutil>=0.5.1 in /usr/local/zy-pkgs/ffproot/ffp/
lib/python2.7/site-packages (from glances)
Cleaning up...


do you have any idea what it can be?

_________________
FR32K | LINUX | EigenHosting | NAS Hacking | NAS im Eigenbau | ALARM


Top
 Profile  
 
PostPosted: Sun Sep 08, 2013 2:48 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
Upgrade your expat to 2.1.0 version:
Code:
slacker -Uu br2:expat

Expat 2.0.1 from Fonz repo don't have function-'XML_SetHashSalt'

P.S Also check
Code:
ldd /ffp/lib/python2.7/lib-dynload/pyexpat.so
after install.
Tried myself and successfully installed flexget with dependancy packages automatically:
Code:
Successfully installed flexget FeedParser SQLAlchemy PyYAML BeautifulSoup beautifulsoup4 html5lib PyRSS2Gen pynzb progressbar jinja2 flask cherrypy requests python-dateutil jsonschema python-tvrage Werkzeug itsdangerous six
Cleaning up...


Last edited by barmalej2 on Sun Nov 03, 2013 5:24 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Sep 11, 2013 4:38 pm 
Offline
User avatar

Joined: Tue Feb 05, 2013 6:46 am
Posts: 44
Location: Germany
THX worked :P

_________________
FR32K | LINUX | EigenHosting | NAS Hacking | NAS im Eigenbau | ALARM


Top
 Profile  
 
PostPosted: Sat Oct 19, 2013 7:43 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
First post is edited and updated today again. Changes:
1. Python ffp package release updated. Now it is build with UCS2 instead UCS4. Should be more compatible with other 2.7.* releases.
2. Updated setuptools to 1.1.6 version
3. Fully clarified dependencies for python and pip tool. Updated slacker links to new br2 repo.
4. Added instructions to second post, how to upgrade from my previous release-python-2.7.5-arm-0.txz
5. Added link to the end of first post, where all differences between pip and setuptools (easy_install) are shown.


Top
 Profile  
 
PostPosted: Thu Nov 07, 2013 6:53 pm 
Offline

Joined: Mon Jul 01, 2013 7:05 am
Posts: 7
Thanks!
great work!
Perfect!


Top
 Profile  
 
PostPosted: Thu Nov 07, 2013 7:32 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
You are welcome :)


Top
 Profile  
 
PostPosted: Mon Nov 11, 2013 7:29 pm 
Offline

Joined: Mon Jul 01, 2013 7:05 am
Posts: 7
never mind...
found another way without pymssql...

---
trying to install "pip install pymssql"
unfortunately, i get:
_mssql.c:314:22: fatal error: sqlfront.h: No such file or directory
while building...


Top
 Profile  
 
PostPosted: Tue Nov 12, 2013 10:07 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
pymssql requires freetds package installed before http://www.freetds.org/, otherwise you will get error as you already know :)
pymssql is not "pure" python package.

Source:https://code.google.com/p/pymssql/issues/detail?id=97#c12


Top
 Profile  
 
PostPosted: Thu Nov 14, 2013 2:11 pm 
Offline

Joined: Mon Jul 01, 2013 7:05 am
Posts: 7
Thanks again!!


Top
 Profile  
 
PostPosted: Mon Apr 07, 2014 3:25 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2312
Updated python-pip and python-setuptools packages are available on slacker br2 repo. Setuptools since version 3.2 has additional dependency:python-certify, which is included in current setuptools-3.4.1_python2.7.5-arm-1.txz package.
Update them, as per instructions on first post:
Code:
slacker -Uui br2:python


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 80 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group