CherryPy import problem

297 views
Skip to first unread message

Alan Harris-Reid

unread,
Dec 13, 2009, 8:49:31 PM12/13/09
to cherrypy-users

Hi there,

I want to start using CherryPy with Python 3.1.1 and to that end I
have downloaded and installed CherryPy-3.2.0rc1.win32.exe. However,
when I try to load CherryPy via. the command-line I get the following
error...

>>> import cherrypy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python31\lib\site-packages\cherrypy
\__init__.py", line
62, in <module>
from urlparse import urljoin as _urljoin
ImportError: No module named urlparse

I have done a complete hard-disk check and there is no file
urlparse.py anywhere. Should it have been included with my 3.1.1
installation, or do I have to download and install this file
separately?

Any help would be appreciated.

Alan

David Bolen

unread,
Dec 14, 2009, 1:44:36 PM12/14/09
to cherryp...@googlegroups.com
Alan Harris-Reid <aharr...@googlemail.com> writes:

> I want to start using CherryPy with Python 3.1.1 and to that end I
> have downloaded and installed CherryPy-3.2.0rc1.win32.exe. However,
> when I try to load CherryPy via. the command-line I get the following
> error...

It looks like you may have installed the pre-python3 version. In earlier
releases urlparse was a top level library module, while in Python 3+ its
a sub-module within urllib.

I believe the installer you want is CherryPy-3.2.0rc1-py3.win32.exe

-- David

Sylvain Hellegouarch

unread,
Dec 14, 2009, 2:27:52 AM12/14/09
to cherryp...@googlegroups.com
Alan Harris-Reid a �crit :
It seems urlparse has been renamed in Python 3.1:

http://docs.python.org/3.1/library/urllib.parse.html

I think you may have installed the wrong CP version, there are specific
P3k packages available:

http://download.cherrypy.org/cherrypy/3.2.0rc1/

- Sylvain

Alan Harris-Reid

unread,
Dec 14, 2009, 8:22:37 PM12/14/09
to cherrypy-users

To all who replied to my original question - you were right, I had
downloaded the wrong version :-(

Many thanks,
Alan

Reply all
Reply to author
Forward
0 new messages