Question about installing python and modules on Red Hat Linux 6
cs at zip.com.au
Sat Nov 15 06:11:44 CET 2014
On 14Nov2014 19:01, pythonista <software.by.python at gmail.com> wrote:
>I am developing a python application as a contractor.
>I would like to know if someone can provide me with some insight into the problems that then infrastructure team has been having.
>The scope of the project was to install python 2.7.8 and 4 modules/site packages on a fresh linux build.
>The first team failed after almost 3 weeks of work.
>Then they put their star Linux administrator on the task and it took almost a week of considerable effort.
>I was able to perform the same task on my windows desktop in less than a morning.
>I cannot get a straight answer as to what the problems are.
>They just seemed to be building and rebuilding all of the components from scratch.
>Can anyone provide me with insight as to the scope what the problem could have been?
It depends. If they were trying to interoperate with the vendor supplied
Python, they could be fighting with the RPM system.
When I do this these days I do two things:
- fetch and build Python 2.7.8 from source, to install in /usr/local/python-2.7.8 (i.e. use that as the --prefix option for configure).
At this point you could just proceed and use that python, installing inside its
site-packages as usual. Or you could go a little further and make a virtualenv
for your project:
- fetch virtualenv and (blasphemy!) install it in the vendor space using: "python setup.py install"
- create a virtualenv for your project: "/usr/local/python-2.7.8/bin/python2.7 virtualenv.py /usr/local/venv-2.7.8-your-project-name"
At that point you will have a "bin" directory inside
/usr/local/venv-2.7.8-your-project-name with "python" and so forth. Executing
that "python" runs the python-2.7.8 you built earlier but with all the system
paths set to install and use the lib tree inside the virtualenv directory.
The nice thing about that is that it is easy to make multiple virtualenvs,
using distinct collections of additional packages, nicely isolated and easy to
invoke (just run the "python" from within the appropriate virtualenv tree).
Cameron Simpson <cs at zip.com.au>
I just kept it wide-open thinking it would correct itself.
Then I ran out of talent. - C. Fittipaldi
More information about the Python-list