econchick / new-coder

New Coder tutorials
zlib License
597 stars 394 forks source link

fixed placement of sudo command #68

Closed smcquay closed 10 years ago

smcquay commented 10 years ago

The sudo was giving root privilidges to curl rather than python (which needed them). Secondly, the -O option was saving the file to disk rather than passing it into python on stdin.

econchick commented 10 years ago

Thanks @smcquay! the HTML is actually generated from within new-coder/website/_posts. I use Mynt to parse from Markdown -> HTML. Do you mind editing it in new-coder/website/_posts/Begin/2013-09-29-Setup-your-machine.md (if I remember the correct file path).

smcquay commented 10 years ago

How about this?

merwok commented 10 years ago

Merged, thanks. thinks about a way to remove sudo from the instructions entirely

smcquay commented 10 years ago

Yeah, merwok the trick is that you want to train system python to run pip; it's the one and only time you should sudo anything for python (thereafter use virtualenvs).

If you don't care about using system python (objc etc. on a mac), you can use brew python, or some other python (build it from source, ./configure --prefix=/Users/name/py27 # for example).

merwok commented 10 years ago

My remark comes from somewhere else entirely: On Debian and other systems that comply with the UNIX File Hierarchy Standard, it’s very bad form to install stuff to directories like /usr that are the domain of the package manager (dpkg). You install to /usr/local, or /opt, or your home directory, etc.

smcquay commented 10 years ago

Yeah, for some reason on OS X I have to use sudo, but pip gets put into /usr/local/bin ... aside from that which gets modified in /Library/Python/2.7/site-packages/

Yeah, my preference still is to just build cpython and --prefix=/opt/py$version and refer to it implicitly after some munging of PATH.

Thanks for the prompt review and merge.