Is it that easy to install Python ?

S

santiago.diez

Hi there,

I never write any Python program but as a system administrator, I'm often asked to install python on Debian servers.

I just finished downloading, configuring, making and installing.

The binary is now installed in :
/usr/local/Python-2.7.5/bin/python2.7
(the path is a deliberate administrator choice).

Is that it?

What else will my users need?

Regards
Santiago
 
M

Maarten

Hi there,

I never write any Python program but as a system administrator, I'm often asked to install python on Debian servers.

I just finished downloading, configuring, making and installing.

The binary is now installed in :
/usr/local/Python-2.7.5/bin/python2.7
(the path is a deliberate administrator choice).

Is that it?
Probably.

What else will my users need?

The path must be search $PATH in the environment where Python is used, so that standard scripts starting with "#!/usr/bin/env python" will find your python.

Next your users will probably start requesting additional packages (regex, lxml, numpy, scipy, matplotlib, ... depending on what they actually do).

Maarten
 
I

Irmen de Jong

Hi there,

I never write any Python program but as a system administrator, I'm often asked to install python on Debian servers.

I just finished downloading, configuring, making and installing.

The binary is now installed in :
/usr/local/Python-2.7.5/bin/python2.7
(the path is a deliberate administrator choice).

Is that it?

What else will my users need?

Why didn't you use the Debian package instead? You now have installed an unsupported,
untested custom built Python version on your server. Why not simply

$ apt-get install python

and let the Debian package maintainers take care of properly testing and supporting
it... Also, installing additional python packages will be much less of a hassle because
there's hundreds of them readily available in Debian's package repositories and they can
be installed (including correct dependencies) in the same way.


Irmen
 
C

Chris Angelico

Why didn't you use the Debian package instead? You now have installed an unsupported,
untested custom built Python version on your server. Why not simply

$ apt-get install python

That'll do fine on Debian 7 (Wheezy, current stable). On Debian 6
(Squeeze, oldstable), that'll get you a 2.6 release IIRC.

ChrisA
 
G

Grant Edwards

Hi there,

I never write any Python program but as a system administrator, I'm
often asked to install python on Debian servers.

Are you sure it's not already installed? I haven't seen a Linux
distro for a _long_ time that didn't include Python as part of the
base installation.
I just finished downloading, configuring, making and installing.

The binary is now installed in :
/usr/local/Python-2.7.5/bin/python2.7

Why not just apt-get install python?
 
W

wizzofozz

Hi there,

I never write any Python program but as a system administrator, I'm often asked to install python on Debian servers.

I just finished downloading, configuring, making and installing.

As a side note to all who have replied already; as a 'regular' linux
user you can also just download, untar, configure and make.
You can't do 'make install', but that's not required to run the
executables (in this case 'python') built in the previous steps.

just nitpicking .. :)

cheers,
Ozz
 
S

santiago.diez

OK thanks for your answers.
So Python is not a daemon. Is it?
Does it have a config file?

Actually, each site on the web server is jailed in a chrooted environment.
In the chrooted environment, Python appears to be in /usr/bin/python.

If I give developers write access to a folder like /usr/lib/python/dist-packages/ (in the chrooted environment), will this be sufficient?

Regards
Santiago

PS: Thanks for all your opinions about how one should install Python but that wasn't the purpose of this thread. Most programs on my servers are compiled. Period.
 
I

Ian Kelly

OK thanks for your answers.
So Python is not a daemon. Is it?
No.

Does it have a config file?

Not as such. Arbitrary site-specific customization can be done by
creating a sitecustomize module, but this is not standard. There are
also some environment variables that you may want to consider setting
in the system profile, but none are required or generally recommended:

http://docs.python.org/2/using/cmdline.html#environment-variables
Actually, each site on the web server is jailed in a chrooted environment.
In the chrooted environment, Python appears to be in /usr/bin/python.

If I give developers write access to a folder like /usr/lib/python/dist-packages/ (in the chrooted environment), will this be sufficient?

I don't have experience with this, but it seems to me that you should
place the standard library and site-packages in the chrooted
/usr/lib/python2.7 and then set the PYTHONHOME environment variable to
/usr/lib.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top