phong9h / swampy

Automatically exported from code.google.com/p/swampy
0 stars 1 forks source link

Install of Swampy fails on Ubuntu 10.04 #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Download Swampy 2.01 
(http://www.greenteapress.com/thinkpython/swampy/swampy-2.0.1.zip)
2. Unzip, cd to "swampy-2.0.1" directory
3. Try running "sudo python setup.py install"

What is the expected output? What do you see instead?

Instead of running through, the installer fails:
running install
[snip]
copying python2/World.html -> build/lib.linux-i686-2.6/swampy
running install_lib
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier.py to 
barrier.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier.py', 13, 4, ' 
   count = count + 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier1.py to 
barrier1.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier1.py', 13, 4, 
'    count = count + 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier2.py to 
barrier2.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier2.py', 13, 4, 
'    count = count + 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier3.py to 
barrier3.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/barrier3.py', 13, 4, 
'    count = count + 1\n'))
byte-compiling /usr/local/lib/python2.6/dist-packages/swampy/sync_code/fox.py 
to fox.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/fox.py', 11, 4, '    
fc.lock(goose_turn)\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/morris.py to morris.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/morris.py', 12, 4, '  
  room1 += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/mutex2.py to mutex2.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/mutex2.py', 10, 4, '  
  x = x + 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/readwrite.py to 
readwrite.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/readwrite.py', 15, 4, 
'    readers += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar1.py to rebar1.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar1.py', 11, 4, '  
  count += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar2.py to rebar2.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar2.py', 11, 4, '  
  count += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar3.py to rebar3.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar3.py', 12, 4, '  
  count += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar4.py to rebar4.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar4.py', 12, 4, '  
  count += 1\n'))
byte-compiling 
/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar5.py to rebar5.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/rebar5.py', 14, 4, '  
  count += 1\n'))
byte-compiling /usr/local/lib/python2.6/dist-packages/swampy/sync_code/title.py 
to title.pyc
Sorry: IndentationError: ('unexpected indent', 
('/usr/local/lib/python2.6/dist-packages/swampy/sync_code/title.py', 9, 4, '    
readers += 1\n'))
running install_data
error: can't copy 'danger.gif': doesn't exist or not a regular file

What version of the product are you using? On what operating system?

Swampy 2.0.1, Python 2.6.5, Ubuntu 10.04

Please provide any additional information below.

Copying "danger.gif" and "words.txt" from the "python2" subdirectory into 
"swampy-2.0.1" lets the installer run through, but the IndentationErrors remain 
and import of TurtleWorld in python interpreter fails.

Original issue reported on code.google.com by chrisc...@gmail.com on 31 Jan 2011 at 10:42

GoogleCodeExporter commented 9 years ago
Fixed the Intendation/SyntaxErrors in the source files in python2/sync_code/ 
(see attached zip file), now the install runs through (as long as I copy the 
gif and txt files from "python2" to the parent directory as stated in the 
"additional information" section).

However, I'm still not able to do "import TurtleWorld":
ImportError: No module named TurtleWorld

Original comment by chrisc...@gmail.com on 31 Jan 2011 at 11:08

Attachments:

GoogleCodeExporter commented 9 years ago
What does work is the following import: from swampy.TurtleWorld import *

Now I can follow the examples in chapter 4.1 of "Think Python":
>>> from swampy.TurtleWorld import *
>>> world = TurtleWorld()
>>> bob = Turtle()
>>> print bob
<swampy.TurtleWorld.Turtle object at 0xb64342ac>
>>> wait_for_user()

Original comment by chrisc...@gmail.com on 31 Jan 2011 at 11:32

GoogleCodeExporter commented 9 years ago
Im having the same issue using windows 7 starter and python 2.7

Original comment by reedjone...@gmail.com on 20 Feb 2011 at 5:32