Migrating PyPI packages to a newer python minor version

The output of pip-freeze contains version numbers of all installed packages. I do not want to restrict package version numbers, unless there is a problem with some package. The solution is to use pip-chill. If you use a virtualenv, activate it and run

pip install pip-chill
pip-chill --no-version > requirements.txt.no-version

In the new virtualenv — I needed to upgrade from 3.4 to 3.6, see Install a Python 3.6 virtualenv with no site packages on a mac — you can then run

pip install -r requirements.txt.no-version

If a package caused troubles, instead of trying to get that package to work, perhaps it is not required anymore. In my case ‘mlab’ caused problems, so

for i in $(grep -v 'mlab' requirements.txt.no-version) ; do pip install $i ; done

 

 

Advertenties

Een gedachte over “Migrating PyPI packages to a newer python minor version

  1. Pingback: Install a Python 3.6 virtualenv with no site packages on a mac | w01f359

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit /  Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit /  Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log uit /  Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit /  Bijwerken )

Verbinden met %s