I new to Python and to programming in general. I’m a novice, and do not work in programming, just trying to teach myself how to program as a hobby. Prior to Python, I worked with Ruby for a bit and I learned that one of the biggest challenges was actually properly setting up my computer.
Background: I’m on a Macbook with OSX 10.7.
With Ruby, you have to (or rather, you should), edit your ./profile and add PATH info. When you install and use RVM, there are additional items you need to add to your bash_profile.
Do you have to make similar changes with Python? What are the best practices as I’m installing/getting started to ensure I can install modules and packages correctly?
pythonworks out of the box on OS X (as doesruby, for that matter). The only changes I would recommend for a beginner are:1) Python likes to be reassured that the terminal can handle UTF-8 before it will print Unicode strings. Add
export LANG=en_US.UTF-8to.profile. (It may be that the .UTF-8 part is already present by default on Lion – I haven’t checked since Snow Leopard.) Of course, this is something that will help you in debugging, but you shouldn’t rely on it being set this way on other machines.2) Install
pipby doingeasy_install pip(addsudoif necessary). After that, install Python packages usingpip install; this way, you can easily remove them usingpip uninstall.