PyGLet, 2to3...?

Jerry Hill malaclypse2 at gmail.com
Fri Jul 26 15:39:54 CEST 2013


On Thu, Jul 25, 2013 at 7:49 PM, John Ladasky
<john_ladasky at sbcglobal.net> wrote:
> =======================================
>
> john at john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup.py install
>
> [sudo] password for john:
>
> running install
> running build
> running build_py
> running install_lib
> running install_egg_info
> Removing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info
> Writing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info

Pyglet was installed to /usr/local/lib/python3.3/dist-packages ...

> john at john:~/Desktop/pyglet-1.2alpha1$ python3
>
> Python 3.3.1 (default, Apr 17 2013, 22:30:32)
> [GCC 4.7.3] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pyglet
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "./pyglet/__init__.py", line 276
>     print '[%d] %s%s %s' % (thread, indent, name, location)
>                        ^
> SyntaxError: invalid syntax

... But here, the error message is talking about ./pyglet/__init__.py.
 I think you're accidentally importing the pyglet package from the
local directory instead of from the proper location in dist-packages.
Try changing back to your home directory and trying this again.  I
think you're picking up the code from
~/Desktop/pyglet-1.2alpha1/pyglet instead of from
/usr/local/lib/python3.3/dist-packages.

-- 
Jerry



More information about the Python-list mailing list