Python Questions - July 25, 2015

Laura Creighton lac at openend.se
Sun Jul 26 20:38:10 CEST 2015


>       It can take a considerable amount of time and effort to get a 
>programming language installed and running with all of the features that are 
>needed.  It probably took me 5 to 10 years to get Perl organized on my 
>computer like that.


>       So, that is what I was asking about Python.  Once it is installed and 
>running properly, can people simply copy the entire Python directory to some 
>other computer or flash drive and a Python language program will then run?

Yes.  That is actually the usual way to do things for quite a few years now.
What you are talking about is what we call a Python virtual environment.
see: http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
http://simononsoftware.com/virtualenv-tutorial-part-2/
for an introduction to them.

It is common to have many of them for different purposes.  The bottom
line is that it lets you utterly ignore (at least from the python
point of view) any system packages you have on your machine.  Instead,
in a directory, you end up with exactly the tools, modules, etc
that you want for this project.

Works fine on a memory stick, too.

You don't have to worry about conflicts because you are, in effect, doing
a clean build from scratch for every project you have -- or indeed I
usually have many of them even with a single project so I can test that
my code works with different combinations of different versions of other
software.

Laura



More information about the Python-list mailing list