Problems installing Python on server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yansky

    Problems installing Python on server

    I asked my hosting company if they would upgrade Python on my server
    to the latest version. They responded with:

    "Sorry no. We tend to stick with what comes packaged with the unix
    distribution to ease maintenance issues.

    There is nothing stopping you from running your own version of python
    from within your own account. Download the source and compile it and
    install it into your own space. Adjust the fist line of your python
    scripts to reflect the location of YOUR python binary:

    #! /home/youraccount/yourlibs/python

    and you should be all set."

    The build instructions for Python are:
    To start building right away (on UNIX): type "./configure" in the
    current directory and when it finishes, type "make". This creates an
    executable "./python"; to install in usr/local, first do "su root" and
    then "make install".

    The problem is, I don't have root access to the server so I can't do
    the "make install". I have ubuntu on my computer, but from what I
    understand I can't compile it on that and upload it because the server
    runs Red Had and the ./configure would have made it incompatible
    right?

    So how can I build Python without root access?
  • bruno.desthuilliers@gmail.com

    #2
    Re: Problems installing Python on server

    On 28 jan, 22:28, Yansky <thegoodd...@gm ail.comwrote:
    I asked my hosting company if they would upgrade Python on my server
    to the latest version. They responded with:
    >
    "Sorry no. We tend to stick with what comes packaged with the unix
    distribution to ease maintenance issues.
    >
    There is nothing stopping you from running your own version of python
    from within your own account. Download the source and compile it and
    install it into your own space. Adjust the fist line of your python
    scripts to reflect the location of YOUR python binary:
    >
    #! /home/youraccount/yourlibs/python
    >
    and you should be all set."
    >
    The build instructions for Python are:
    To start building right away (on UNIX): type "./configure" in the
    current directory and when it finishes, type "make". This creates an
    executable "./python"; to install in usr/local, first do "su root" and
    then "make install".

    This is the "default" install. You want to have a look at the ./
    configure flags (doing ./configure --help) and set the right options
    for your custom install.
    The problem is, I don't have root access to the server so I can't do
    the "make install".
    You don't need root access to install in your own home directory -
    this is only needed to do a system wide install.
    I have ubuntu on my computer, but from what I
    understand I can't compile it on that and upload it because the server
    runs Red Had and the ./configure would have made it incompatible
    right?
    Indeed
    So how can I build Python without root access?
    cf above : type ./configure --help, read on, set appropriate options,
    and proceed !-)

    HTH

    Comment

    • Devraj

      #3
      Re: Problems installing Python on server

      Also be careful and setup all the paths that is required for compiling
      various Python modules etc.

      On Jan 29, 8:28 am, Yansky <thegoodd...@gm ail.comwrote:
      I asked my hosting company if they would upgrade Python on my server
      to the latest version. They responded with:
      >
      "Sorry no. We tend to stick with what comes packaged with the unix
      distribution to ease maintenance issues.
      >
      There is nothing stopping you from running your own version of python
      from within your own account. Download the source and compile it and
      install it into your own space. Adjust the fist line of your python
      scripts to reflect the location of YOUR python binary:
      >
      #! /home/youraccount/yourlibs/python
      >
      and you should be all set."
      >
      The build instructions for Python are:
      To start building right away (on UNIX): type "./configure" in the
      current directory and when it finishes, type "make". This creates an
      executable "./python"; to install in usr/local, first do "su root" and
      then "make install".
      >
      The problem is, I don't have root access to the server so I can't do
      the "make install". I have ubuntu on my computer, but from what I
      understand I can't compile it on that and upload it because the server
      runs Red Had and the ./configure would have made it incompatible
      right?
      >
      So how can I build Python without root access?

      Comment

      • jim-on-linux

        #4
        Re: Problems installing Python on server

        On Tuesday 29 January 2008 01:20, Devraj
        wrote:
        Also be careful and setup all the paths
        that is required for compiling various
        Python modules etc.
        >
        On Jan 29, 8:28 am, Yansky
        <thegoodd...@gm ail.comwrote:
        I asked my hosting company if they would
        upgrade Python on my server to the
        latest version. They responded with:

        "Sorry no. We tend to stick with what
        comes packaged with the unix
        distribution to ease maintenance issues.

        There is nothing stopping you from
        running your own version of python from
        within your own account. Download the
        source and compile it and install it
        into your own space. Adjust the fist
        line of your python scripts to reflect
        the location of YOUR python binary:

        #! /home/youraccount/yourlibs/python

        and you should be all set."
        Go to the ReadME file after you unpack
        python.
        Open and look for "Installing ".
        Read the section, it explains how to install
        on the entire system and how to install
        locally.
        "Make altinstall" is what you are looking
        for.

        jim-on-linux
        http:\\www.inqvista.com




        The build instructions for Python are:
        To start building right away (on UNIX):
        type "./configure" in the current
        directory and when it finishes, type
        "make". This creates an executable
        "./python"; to install in usr/local,
        first do "su root" and then "make
        install".

        The problem is, I don't have root access
        to the server so I can't do the "make
        install". I have ubuntu on my computer,
        but from what I understand I can't
        compile it on that and upload it because
        the server runs Red Had and the
        ./configure would have made it
        incompatible right?

        So how can I build Python without root
        access?

        Comment

        • jim-on-linux

          #5
          Fwd: Re: Problems installing Python on server



          Also be careful and setup all the paths
          that is required for compiling various
          Python modules etc.

          On Jan 29, 8:28 am, Yansky
          >
          <thegoodd...@gm ail.comwrote:
          I asked my hosting company if they
          would upgrade Python on my server to
          the latest version. They responded
          with:
          >
          "Sorry no. We tend to stick with what
          comes packaged with the unix
          distribution to ease maintenance
          issues.
          >
          There is nothing stopping you from
          running your own version of python
          from within your own account. Download
          the source and compile it and install
          it into your own space. Adjust the
          fist line of your python scripts to
          reflect the location of YOUR python
          binary:
          >
          #! /home/youraccount/yourlibs/python
          >
          and you should be all set."
          >
          Go to the ReadME file after you unpack
          python.
          Open and look for "Installing ".
          Read the section, it explains how to
          install on the entire system and how to
          install locally.
          "Make altinstall" is what you are looking
          for.
          >
          jim-on-linux
          http:\\www.inqvista.com
          >
          The build instructions for Python are:
          To start building right away (on
          UNIX): type "./configure" in the
          current directory and when it
          finishes, type "make". This creates an
          executable "./python"; to install in
          usr/local, first do "su root" and then
          "make install".
          >
          The problem is, I don't have root
          access to the server so I can't do the
          "make install". I have ubuntu on my
          computer, but from what I understand I
          can't compile it on that and upload it
          because the server runs Red Had and
          the ./configure would have made it
          incompatible right?
          >
          So how can I build Python without root
          access?
          Will the "make install" make my Python the
          default one? If I want to install some
          Python modules, will I need to alter their
          installation as well or will it see my
          Python version as the right one to install
          too?

          Cheers.

          -------------------------------------------------------

          Comment

          • Steve Holden

            #6
            Re: Fwd: Re: Problems installing Python on server

            jim-on-linux wrote:
            >
            >
            >>Also be careful and setup all the paths
            >>that is required for compiling various
            >>Python modules etc.
            >>>
            >>On Jan 29, 8:28 am, Yansky
            ><thegoodd...@g mail.comwrote:
            >>>I asked my hosting company if they
            >>>would upgrade Python on my server to
            >>>the latest version. They responded
            >>>with:
            >>>>
            >>>"Sorry no. We tend to stick with what
            >>>comes packaged with the unix
            >>>distributi on to ease maintenance
            >>>issues.
            >>>>
            >>>There is nothing stopping you from
            >>>running your own version of python
            >>>from within your own account. Download
            >>>the source and compile it and install
            >>>it into your own space. Adjust the
            >>>fist line of your python scripts to
            >>>reflect the location of YOUR python
            >>>binary:
            >>>>
            >>>#! /home/youraccount/yourlibs/python
            >>>>
            >>>and you should be all set."
            >Go to the ReadME file after you unpack
            >python.
            >Open and look for "Installing ".
            >Read the section, it explains how to
            >install on the entire system and how to
            >install locally.
            >"Make altinstall" is what you are looking
            >for.
            >>
            >jim-on-linux
            >http:\\www.inqvista.com
            >>
            >>>The build instructions for Python are:
            >>>To start building right away (on
            >>>UNIX): type "./configure" in the
            >>>current directory and when it
            >>>finishes, type "make". This creates an
            >>>executable "./python"; to install in
            >>>usr/local, first do "su root" and then
            >>>"make install".
            >>>>
            >>>The problem is, I don't have root
            >>>access to the server so I can't do the
            >>>"make install". I have ubuntu on my
            >>>computer, but from what I understand I
            >>>can't compile it on that and upload it
            >>>because the server runs Red Had and
            >>>the ./configure would have made it
            >>>incompatib le right?
            >>>>
            >>>So how can I build Python without root
            >>>access?
            >
            Will the "make install" make my Python the
            default one? If I want to install some
            Python modules, will I need to alter their
            installation as well or will it see my
            Python version as the right one to install
            too?
            >
            The "default one"? That's just the one that runs when a user enters the

            python

            command, right? "make install" will install Python wherever you told the
            configure utility to build it for. "make altinstall" is a convenience
            method that (IIRC) builds for /usr/local/bin.

            Generally speaking when you install an extension or other module,
            nowadays you use the command

            python setup.py install

            The installation takes place in whichever copy of Python runs setup.py,
            so with a "default" /usr/bin/python and an "alternate"
            /usr/local/bin/python, to install a module in the alternate you would run

            /usr/local/bin/python setup.py install

            The same is true of a Python you have installed somewhere under your
            home directory.

            regards
            Steve
            --
            Steve Holden +1 571 484 6266 +1 800 494 3119
            Holden Web LLC http://www.holdenweb.com/

            Comment

            • jim-on-linux

              #7
              Re: Fwd: Re: Problems installing Python on server

              On Thursday 31 January 2008 09:46,
              jim-on-linux wrote:
              Also be careful and setup all the
              paths that is required for compiling
              various Python modules etc.
              >
              On Jan 29, 8:28 am, Yansky
              <thegoodd...@gm ail.comwrote:
              I asked my hosting company if they
              would upgrade Python on my server to
              the latest version. They responded
              with:

              "Sorry no. We tend to stick with
              what comes packaged with the unix
              distribution to ease maintenance
              issues.

              There is nothing stopping you from
              running your own version of python
              from within your own account.
              Download the source and compile it
              and install it into your own space.
              Adjust the fist line of your python
              scripts to reflect the location of
              YOUR python binary:

              #! /home/youraccount/yourlibs/python

              and you should be all set."
              Go to the ReadME file after you unpack
              python.
              Open and look for "Installing ".
              Read the section, it explains how to
              install on the entire system and how to
              install locally.
              "Make altinstall" is what you are
              looking for.

              jim-on-linux
              http:\\www.inqvista.com
              The build instructions for Python
              are: To start building right away
              (on UNIX): type "./configure" in the
              current directory and when it
              finishes, type "make". This creates
              an executable "./python"; to install
              in usr/local, first do "su root" and
              then "make install".

              The problem is, I don't have root
              access to the server so I can't do
              the "make install". I have ubuntu on
              my computer, but from what I
              understand I can't compile it on
              that and upload it because the
              server runs Red Had and the
              ./configure would have made it
              incompatible right?

              So how can I build Python without
              root access?
              >
              Will the "make install" make my Python the
              default one? If I want to install some
              Python modules, will I need to alter
              their installation as well or will it see
              my Python version as the right one to
              install too?
              >
              Cheers.
              From the Readme file enclose with Python;

              ------
              " If you have a previous installation of
              Python that you don't
              want to replace yet, use

              make altinstall

              This installs the same set of files as "make
              install" except it
              doesn't create the hard link to
              "python<version >" named "python" and
              it doesn't install the manual page at all. "
              ------


              I installed python 2.5
              using make altinstall by going to

              " /usr/local/lib "
              unpacking, then using
              make altinstall

              Folder 2.5 is created.
              To add modules, as I have added PIL to my
              system, I go to;

              " /usr/local/lib/python2.5/site-packages "
              where I installed PIL.

              installing a py module in the site-packages
              folder is where I would install any package
              unless otherwise directed. When upgrading
              you can go to the site directory and see
              what's in there, and what has to be added to
              a new upgrade.

              http:\\www.inqvista.com

              jim-on-linux



              Comment

              • Paul Boddie

                #8
                Re: Problems installing Python on server

                On 28 Jan, 22:28, Yansky <thegoodd...@gm ail.comwrote:
                I asked my hosting company if they would upgrade Python on my server
                to the latest version. They responded with:
                >
                "Sorry no. We tend to stick with what comes packaged with the unix
                distribution to ease maintenance issues.
                Which version are they running, by the way?
                There is nothing stopping you from running your own version of python
                from within your own account. Download the source and compile it and
                install it into your own space. Adjust the fist line of your python
                scripts to reflect the location of YOUR python binary:
                >
                #! /home/youraccount/yourlibs/python
                >
                and you should be all set."
                This sounds like reasonable advice, I suppose.
                The build instructions for Python are:
                To start building right away (on UNIX): type "./configure" in the
                current directory and when it finishes, type "make". This creates an
                executable "./python"; to install in usr/local, first do "su root" and
                then "make install".
                >
                The problem is, I don't have root access to the server so I can't do
                the "make install".
                I think that the "su root" stuff is just there in anticipation of
                people trying to configure, build and install Python without thinking
                too hard about it and then finding that they get lots of errors about
                installing into places they don't have permissions for. If you're
                installing into a different location, you only need to have
                permissions to write to that location.
                I have ubuntu on my computer, but from what I understand I can't
                compile it on that and upload it because the server
                runs Red Had and the ./configure would have made it incompatible
                right?
                If you have shell access on the hosting service and they have
                compilers available, you can just do the build and install there.
                Building on your own computer and having the executable work on the
                server is likely to be more difficult due to the usual library
                versioning issues that arise between distributions - it'd be
                interesting to see if anyone can suggest a solution for this involving
                the LSB tools.
                So how can I build Python without root access?
                Something like this:

                mkdir /home/youraccount/apps # optional - see below
                ./configure --prefix=/home/youraccount/apps
                make
                make install

                Here, the apps directory in your home directory will contain the usual
                UNIX directory structure that you would otherwise see in /usr:
                directories such as bin, lib, share (probably), and so on. You'll find
                the python executable as /home/youraccount/apps/bin/python.

                Some people like to mimic the full UNIX structure and have a usr
                directory (either underneath or instead of the apps directory employed
                above); others prefer to have the bin, lib (and other directories) in
                their home directory (thus omitting the apps directory); you get to
                choose. ;-)

                I hope this helps!

                Paul

                Comment

                Working...