Time for action installing CherryPy

The one thing to be careful with when you install CherryPy is that you have to make sure you install it in the right directory if you have more than one Python version on your system. CherryPy uses a setup script to install itself and one way to make sure the CherryPy modules end up in the correct place is by invoking Python explicitly with a full path, for example:


cd C:CherryPy-3.2.0rc1
c:Python32python.exe setup.py install

What just happened?

Running CherryPy's setup.py script installs a number of modules in Python's Libsite-packages directory. You may verify this was successful by typing the following on the command line:


python -c "import cherrypy"

This checks whether we can import the cherrypy module. If everything is installed correctly, there will be no output produced by this command. However, if CherryPy isn't installed, this may be signaled by an error message:


Traceback (most recent call last):
	File "<string>", line 1, in <module>
ImportError: No module named cherrypy

When you have more than one version of Python installed, be careful to enter the complete path of the Python executable to select the correct version, for example:


C:python32python c "import cherrypy"
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.249.252