Pybrain版安装?

时间:2013-10-22 13:06:58

标签: version pybrain

我如何知道我的机器中安装了哪个pybrain版本?例如,如果我想知道我有哪个numpy版本,我只需输入:

import numpy

print numpy.version.version

1 个答案:

答案 0 :(得分:1)

>>> import pkg_resources
>>> pkg_resources.get_distribution("pybrain").version

替代

  1. 了解它是否已安装:pydoc modules | grep pybrain
  2. 似乎只有0.3版本(参见source)。
  3. 进入Python控制台并输入

    >>> import pybrain
    >>> help(pybrain)
    

    你得到了

    Help on package pybrain:
    
    NAME
        pybrain
    
    FILE
        /usr/local/lib/python2.7/dist-packages/pybrain/__init__.py
    
    PACKAGE CONTENTS
        auxiliary (package)
        datasets (package)
        optimization (package)
        rl (package)
        structure (package)
        supervised (package)
        tests (package)
        tools (package)
        unsupervised (package)
        utilities
    

    请看一下/usr/local/lib/python2.7/dist-packages/文件夹。在我的例子中,有一个PyBrain-0.3.egg-info表示我有PyBrain 0.3。