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

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
主站蜘蛛池模板: 蒙自县| 施秉县| 姜堰市| 黄石市| 武陟县| 沁阳市| 富蕴县| 广汉市| 绥棱县| 札达县| 鄂托克旗| 广河县| 宝丰县| 汤阴县| 金塔县| 上虞市| 治县。| 吴忠市| 邢台市| 荥阳市| 英德市| 华池县| 迭部县| 连山| 孟州市| 北流市| 镇康县| 民乐县| 柏乡县| 陵水| 改则县| 定安县| 贵港市| 曲麻莱县| 台南县| 独山县| 张家界市| 上栗县| 玉田县| 榆树市| 伊宁市|