12

I'm very new to CherryPy. I want to know which CherryPy version is installed in my machine. How to get CherryPy version in terminal?

Thank you for educate me.

Zeck
  • 6,433
  • 21
  • 71
  • 111

4 Answers4

28
python -c "import cherrypy;print cherrypy.__version__"
synthesizerpatel
  • 27,321
  • 5
  • 74
  • 91
2

Python 3 syntax:

python -c "import cherrypy;print(cherrypy.__version__)"
bob
  • 419
  • 4
  • 11
1

In ubuntu, you just need to check the package version:

apt-cache policy python-cherrypy3

For example, in my system:

python-cherrypy3:
  Installed: 3.1.2-1
  Candidate: 3.1.2-1
  Version table:
 *** 3.1.2-1 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
        100 /var/lib/dpkg/status
jcollado
  • 39,419
  • 8
  • 102
  • 133
  • 1
    doesn't this assume it was installed via apt or the package manager in general? maybe he installed it via pip etc? – Uku Loskit Feb 15 '12 at 12:23
  • @UkuLoskit Yes, I made that assumption. If that's not the case, then the answer from synthesizerpatel is the right one. – jcollado Feb 15 '12 at 12:26
1

is

dpkg -l | grep -i cherrypy

what you are looking for?

Jörg Beyer
  • 3,631
  • 21
  • 35