analitics

Pages

Sunday, April 19, 2015

Upgrading all packages with pip using python script.

Can be done under Windows OS with this python script :
C:\Python27>python.exe
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> from subprocess import call
>>>
>>> for dist in pip.get_installed_distributions():
...     call("pip install --upgrade " + dist.project_name, shell=True)
...
You are using pip version 6.0.8, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already up-to-date: appdirs in c:\python34\lib\site-packages
0
You are using pip version 6.0.8, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.3.2.tar.gz
...
The Windows will need to have the Script path folder into enviroment variables: C:\Python27\Scripts.
If you use Linux OS shell then you can use this :
pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U

Saturday, April 18, 2015

pip-Win the new GUI for python pip.

The pip-Win is a Python Package manager that is easy to install and let you to automatically installs python module using pip and virtualenv on Windows.
Features
  • switch from one python interpreter (i.e. version) to another (including py and pypy)
  • see all installed packages, and whether they are up-to-date
  • install or upgrade a package, or upgrade pip itself
  • create and delete virtual environments, and switch between them
  • run the IDLE or another python script, with the selected interpreter

Also pip-Win is made available under the GNU Lesser General Public Licence.
You can try it from here.