A formidable effort. It might be matter of taste but recommendations given starting from "Understanding the packages" and to "Install packages that need compiling" are almost harmful. My preference: * you should not care what is your `sys.path` looks like. You need it for debugging if something goes horribly wrong. A tutorial might mention it but things like `sys.path.insert(0,..)` should be avoided or accompanied wi…
My indented audience was not the pure beginners. I was targeting for developers coming to python from other platforms. Over past 2 years, if I have learned one thing while training interns, trainees and experience devs in Python/Django, it is that packaging confuses people a lot. apt-get vs easy_install vs pip. That is why I choose to spend most time on package management and virtualenv etc. I think, I should have in…
Python Ecosystem - An Introduction
51–60 of 78 posts
Re: Python Ecosystem - An Introduction
#52Re: Python Ecosystem - An Introduction
#53https://github.com/utahta/pythonbrew
It's the Python version of RVM. It is higher level than even virtualenv, and in my opinion, the most seamless way to manage Python environments.
Re: Python Ecosystem - An Introduction
#54Re: Python Ecosystem - An Introduction
#55Please keep the great feedback coming. I will try to incorporate as much as possible. I am indebted to HN community for the great feedback so far.
Re: Python Ecosystem - An Introduction
#56Nice article. I am bookmarking it. Also The Zen of Python can always be accessed by this Easter egg >>> import this http://www.python.org/dev/peps/pep-0020/
IMHO this is more useful in the long run ... http://www.cs.yale.edu/quotes.html
Re: Python Ecosystem - An Introduction
#57Or even better, give them a stackoverflow search like this one http://stackoverflow.com/search?q=%5Bpython%5D+%22install+py...
P.S. I think that your wiki page is a great idea and I'm going to write a custom one for our developer wiki.
Re: Python Ecosystem - An Introduction
#58> Choose Python 3 only if you need to and/or fully understand the implications. I would apply the "if you need to" part to Python 2. "3 if you can, 2 if you must"
That said, I try to use any backported 3.0 features such as .format for string formatting. And for beginners, I heartily recommend using the 'six' module. That way when you need to move to 3.0, porting your code or your skills, will be easy-peasy.
Re: Python Ecosystem - An Introduction
#59Re: Python Ecosystem - An Introduction
#60I think that $ sudo apt-get install python-pip is a bad idea. You should not mix multiple packaging system on your operating system. And more you can dammage it pip provide more recent package than your distro. And if you upgrade a lib that have an incompatibility with a part of the system, you can corrupt it. I have no example to give but I am sure you can find it... Ubuntu now have many tools written in python. You…
But for app development, get your own Python, manage it yourself and install 'distribute' so that you have both easy_install and pip to work with. I've taken that to extreme by making a portable Python distro that comes in a tarball and runs on any Linux distro, but even if you only untar the source and run ./configure --prefix=/home/python;make
That will build a default Python with support for any shared libraries for which you have a development version installed ( -dev version on debian/ubuntu, -devel version on redhat/suse)
sudo make install will install it, assuming that you have write permissions on the target prefix that you specified. You can even hide it in your home directory with --prefix=~/tools/python272