Bit of info: Python 3.2.3, Cherrypy version 3.2.2. Windows 7 64-bit.
Installed Cherrypy, set up PATH with the right Python directory, etc. However, whenever I run the tutorial file (tut01, Hello world) or any other python file with the same code, I get the following output:
F:\Code>python helloworld.py [29/Nov/2012:22:37:22] ENGINE Listening for SIGTERM. [29/Nov/2012:22:37:22] ENGINE Bus STARTING CherryPy Checker: The Application mounted at '' has an empty config.
[29/Nov/2012:22:37:22] ENGINE Started monitor thread '_TimeoutMonitor'. [29/Nov/2012:22:37:22] ENGINE Started monitor thread 'Autoreloader'. [29/Nov/2012:22:37:22] ENGINE Error in 'start' listener > Traceback (most recent call last): File "C:\Python32\lib\site-packages\cherrypy\process\wspbus.py", line 197, in publish output.append(listener(*args, **kwargs)) File "C:\Python32\lib\site-packages\cherrypy_cpserver.py", line 150, in start
self.httpserver, self.bind_addr = self.httpserver_from_self() File "C:\Python32\lib\site-packages\cherrypy\_cpserver.py", line 140,in https erver_from_self from cherrypy import _cpwsgi_server File "C:\Python32\lib\site-packages\cherrypy_cpwsgi_server.py", line 7, in from cherrypy import wsgiserver File "C:\Python32\lib\site-packages\cherrypy\wsgiserver__init__.py", line 14, in exec('from .wsgiserver3 import *') File "", line 1, in ImportError: No module named wsgiserver3
[29/Nov/2012:22:37:22] ENGINE Shutting down due to error in start listener: Traceback (most recent call last): File "C:\Python32\lib\site-packages\cherrypy\process\wspbus.py", line 235, in start self.publish('start') File "C:\Python32\lib\site-packages\cherrypy\process\wspbus.py", line 215, in publish raise exc cherrypy.process.wspbus.ChannelFailures: ImportError('No module named wsgiserver 3',)
[29/Nov/2012:22:37:22] ENGINE Bus STOPPING [29/Nov/2012:22:37:22] ENGINE HTTP Server None already shut down [29/Nov/2012:22:37:22] ENGINE Stopped thread 'Autoreloader'. [29/Nov/2012:22:37:22] ENGINE Stopped thread '_TimeoutMonitor'. [29/Nov/2012:22:37:22] ENGINE Bus STOPPED [29/Nov/2012:22:37:22] ENGINE Bus EXITING [29/Nov/2012:22:37:22] ENGINE Bus EXITED
And pointing browser to localhost:8080 does nothing, when it should show Hello World.
Pretty sure I did everything correctly according to the installation guide on the Cherrypy website. Not entirely sure how to fix it, but I'm guessing it has something to do with the import errors. Has anyone else had success with installing cherrypy on windows for python3?
Found a solution: https://bitbucket.org/cherrypy/cherrypy/issue/1110/cherrypy-322win32exe-installer-didnt
The original installer was missing the wsgiserver3 module, which was needed for it to work on Python 3.x. The above installer should fix the issue.
I struggled with this, there is a simple solution:
python setup.py installIt is mentioned in the README.txt here in the official source repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With