官术网_书友最值得收藏!

Package upgrades

More often than not, you will find yourself in a situation where you have to upgrade a package because either the new version is required by a dependency or it has additional features that you would like to use. First, check the version of the library you have installed by glancing at the __version__ attribute, as shown in the following example, numpy:

>>> import numpy
>>> numpy.__version__ # 2 underscores before and after
'1.11.0'

Now, if you want to update it to a newer release, say the 1.12.1 version, you can run the following command from the command line:

$> pip install -U numpy==1.12.1

Alternatively, you can use the following command:

$> easy_install --upgrade numpy==1.12.1

Finally, if you're interested in upgrading it to the latest available version, simply run the following command:

$> pip install -U numpy

You can alternatively run the following command:

$> easy_install --upgrade numpy
主站蜘蛛池模板: 松溪县| 肥乡县| 仙居县| 黄山市| 秦皇岛市| 杂多县| 新乡县| 金山区| 东明县| 翁牛特旗| 九龙县| 突泉县| 谢通门县| 东明县| 南雄市| 景泰县| 五华县| 太原市| 东台市| 武宣县| 塔城市| 根河市| 绍兴县| 九龙城区| 新绛县| 湘潭市| 孝感市| 水城县| 弥勒县| 荣昌县| 广元市| 汕头市| 五莲县| 平阴县| 偃师市| 黑龙江省| 岱山县| 平阳县| 竹山县| 土默特左旗| 时尚|