Ответ 1
python -c "import cherrypy;print cherrypy.__version__"
Я очень новичок в CherryPy. Я хочу знать, какая версия CherryPy установлена на моей машине. Как получить версию CherryPy в терминале?
Спасибо, что просветили меня.
python -c "import cherrypy;print cherrypy.__version__"
есть
dpkg -l | grep -i cherrypy
что вы ищете?
В ubuntu вам просто нужно проверить версию пакета:
apt-cache policy python-cherrypy3
Например, в моей системе:
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
Синтаксис Python 3:
python -c "import cherrypy;print(cherrypy.__version__)"