pipdebiancherrypyvirtual-environment

Installed cherrypy successfully in virtual environment, but cherrypy --version says command not found


Debian bookworm:

I'm trying to debug a cherrypy web app, so my plan is to add some cherrypy-based logging statements and run the app locally. However, when I tried to install cherrypy via pip, I got the 'this environment is managed externally' error - create a virtual environment. So I created a virtual environment and (I think successfully) installed cherrypy there, but when I ask for the version number, I get 'command not found'. Details below:

created virtual environment with python3 -m venv my-virtual-env activated with . ./my-virtual-env/bin/activate (prompt now shows '(my-virtual-env)') installed cherrypy with pip install cherypy (got 'successfully installed cherrypy-18.10.0') checked cherrypy version with cherrypy --version (got 'command not found') checked cherrypy version with sudo cherrypy --version (got 'command not found')

cd'd into my-virtual-env and did cherrypy --version (got 'command not found')

Can anyone see what I'm doing wrong here?

TIA,

Frank


Solution

  • The package provides cherrypy framework; it is mostly a library for developers and doesn't have scripts. It has a script cherryd to run an HTTP server. Try cherryd --help — there is no --version among the options.

    You can also run python -m cherrypy --help but it's exactly the same daemon.

    To get version run

    python -c "from cherrypy import __version__; print(__version__)"