Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (Retired) Dungeon Game Building the Game: Part 1

Why can I not run in python shell?

So while doing these classes I have python 2.7 shell running next to me. I just finished Building the game part 1. I transferred code over to the workspace and it ran fine. When I try running the module in the python shell though, it says that my directions are not defined. move = input("> ") is not registering. Any tips ? Thanks

2 Answers

Jake Shasteen
Jake Shasteen
15,985 Points

You have to use python3.4 -- in python 2.7, the input() function works differently than in 3.4.

Thanks, I just realized I've been running 2.7 on my laptop, and 3.4 on my desktop.

That means you have an error in your code <><>< Good luck