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

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
主站蜘蛛池模板: 英吉沙县| 长海县| 武宣县| 祁东县| 万盛区| 会宁县| 潮州市| 舞钢市| 通许县| 建阳市| 五大连池市| 长阳| 遂川县| 韶山市| 洮南市| 沁源县| 深水埗区| 特克斯县| 措勤县| 德化县| 海丰县| 天峻县| 凌源市| 莱州市| 阿城市| 新丰县| 台中县| 宁河县| 沭阳县| 新干县| 霍邱县| 漳浦县| 公主岭市| 固镇县| 兰考县| 武强县| 台南县| 桂平市| 河池市| 临清市| 兰溪市|