我如何知道我的机器中安装了哪个pybrain版本?例如,如果我想知道我有哪个numpy版本,我只需输入:
import numpy
print numpy.version.version
答案 0 :(得分:1)
>>> import pkg_resources
>>> pkg_resources.get_distribution("pybrain").version
pydoc modules | grep pybrain
进入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。