Loading ...
Sorry, an error occurred while loading the content.

Python Installation on SlugOS 4.8-beta

Expand Messages
  • reuter.rudolf
    Hello, I tried to install python on SlugOS 4.8-beta. To my surprise no longer a complete package was found in the feed. So I did: ipkg install python-core
    Message 1 of 6 , Dec 7, 2008
    • 0 Attachment
      Hello,
      I tried to install python on SlugOS 4.8-beta. To my surprise no longer
      a complete package was found in the feed. So I did:
      ipkg install python-core (version 2.5.1)
      in the hope to find more information how to come to a complete package
      as before (V2.4). But no readable infos in /usr/lib/python2.5.
      Next step was to install:
      ipkg-opt install python25 (version 2.5.2-2)

      That installed a complete python package as I was used before. But
      wenn I call "env python" the python-core (v2.5.1) was called.
      I need some side-packages (py-serial, etc.) which exists under opt only.

      Hence, what is the best way to proceed?
      1. Ignoring python-core (v.2.5.1) and linking python2.5.2-2 in place?
      2. copying site-packages from /opt/lib/python2.5 to /usr/lib/python25
      and to complete python with other packages, but which? I found a list
      with google: python-core, python-crypt, python-io, python-lang,
      python-pickle, python-shell, python-textutils.
      Does that give me a complete python package on my NSLU2 as on opt?

      Best regards, I will appreciate any help,
      Rudy
    • Brian Zhou
      If you use optware python, my advice is to keep it self-contained in /opt. Don t copy or link /opt stuff to /usr, unless you know what you re doing and don t
      Message 2 of 6 , Dec 7, 2008
      • 0 Attachment
        If you use optware python, my advice is to keep it self-contained in
        /opt. Don't copy or link /opt stuff to /usr, unless you know what
        you're doing and don't bother either OE or optware developers.

        For your situation, you can leave optware python25 where they are, and
        just change your python script to explicity use
        "#!/opt/bin/python2.5". Or, if there're too many scripts using
        "#!/usr/bin/env python", you can play the PATH game to have /opt/bin
        in front of /usr/bin in your PATH for the starting script. The optware
        python package provides the /opt/bin/python symlink to
        /opt/bin/python2.5.

        -Brian Zhou

        --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@...>
        wrote:
        >
        > Hello,
        > I tried to install python on SlugOS 4.8-beta. To my surprise no
        longer
        > a complete package was found in the feed. So I did:
        > ipkg install python-core (version 2.5.1)
        > in the hope to find more information how to come to a complete
        package
        > as before (V2.4). But no readable infos in /usr/lib/python2.5.
        > Next step was to install:
        > ipkg-opt install python25 (version 2.5.2-2)
        >
        > That installed a complete python package as I was used before. But
        > wenn I call "env python" the python-core (v2.5.1) was called.
        > I need some side-packages (py-serial, etc.) which exists under opt
        only.
        >
        > Hence, what is the best way to proceed?
        > 1. Ignoring python-core (v.2.5.1) and linking python2.5.2-2 in
        place?
        > 2. copying site-packages from /opt/lib/python2.5 to
        /usr/lib/python25
        > and to complete python with other packages, but which? I found a
        list
        > with google: python-core, python-crypt, python-io, python-lang,
        > python-pickle, python-shell, python-textutils.
        > Does that give me a complete python package on my NSLU2 as on opt?
        >
        > Best regards, I will appreciate any help,
        > Rudy
        >
      • reuter.rudolf
        Hello Brian, Thank you very much for your quick and extensive answer. My experience in trying your suggestions is the following: 1. Moving /opt/bin/ in file
        Message 3 of 6 , Dec 8, 2008
        • 0 Attachment
          Hello Brian,
          Thank you very much for your quick and extensive answer.
          My experience in trying your suggestions is the following:
          1. Moving /opt/bin/ in file /etc/profile to the first place in the
          PATH statement showed the problem that WinSCP no longer worked.
          Therefore I left /opt/bin at the end of PATH. Test with $ env.

          2. I have not seen any symlink /opt/bin/python. In
          /opt/lib/ipkg/info/python25.list there is no file like /opt/bin/python.

          3. Seeing in /usr/bin that "python" (version 2.5.1) was a copy of
          "python2.5" I renamed "python" to "python.org". Next step was to copy
          /opt/bin/python2.5 to /opt/bin/python. When I call now "env python"
          the python version 2.5.2 from /opt/bin/ was called.
          Is that a good solution?

          With best regards, Rudy

          --- In nslu2-linux@yahoogroups.com, "Brian Zhou" <b88zhou@...> wrote:
          >
          > If you use optware python, my advice is to keep it self-contained in
          > /opt. Don't copy or link /opt stuff to /usr, unless you know what
          > you're doing and don't bother either OE or optware developers.
          >
          > For your situation, you can leave optware python25 where they are, and
          > just change your python script to explicity use
          > "#!/opt/bin/python2.5". Or, if there're too many scripts using
          > "#!/usr/bin/env python", you can play the PATH game to have /opt/bin
          > in front of /usr/bin in your PATH for the starting script. The optware
          > python package provides the /opt/bin/python symlink to
          > /opt/bin/python2.5.
          >
          > -Brian Zhou
          >
          > --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@>
          > wrote:
          > >
          > > Hello,
          > > I tried to install python on SlugOS 4.8-beta. To my surprise no
          > longer
          > > a complete package was found in the feed. So I did:
          > > ipkg install python-core (version 2.5.1)
          > > in the hope to find more information how to come to a complete
          > package
          > > as before (V2.4). But no readable infos in /usr/lib/python2.5.
          > > Next step was to install:
          > > ipkg-opt install python25 (version 2.5.2-2)
          > >
          > > That installed a complete python package as I was used before. But
          > > wenn I call "env python" the python-core (v2.5.1) was called.
          > > I need some side-packages (py-serial, etc.) which exists under opt
          > only.
          > >
          > > Hence, what is the best way to proceed?
          > > 1. Ignoring python-core (v.2.5.1) and linking python2.5.2-2 in
          > place?
          > > 2. copying site-packages from /opt/lib/python2.5 to
          > /usr/lib/python25
          > > and to complete python with other packages, but which? I found a
          > list
          > > with google: python-core, python-crypt, python-io, python-lang,
          > > python-pickle, python-shell, python-textutils.
          > > Does that give me a complete python package on my NSLU2 as on opt?
          > >
          > > Best regards, I will appreciate any help,
          > > Rudy
          > >
          >
        • Brian Zhou
          ... You only need to change the PATH for your particular script, no need to make the PATH global. You can even try something real quick with env
          Message 4 of 6 , Dec 8, 2008
          • 0 Attachment
            > 1. Moving /opt/bin/ in file /etc/profile to the first place in the
            > PATH statement showed the problem that WinSCP no longer worked.
            > Therefore I left /opt/bin at the end of PATH. Test with $ env.
            >
            You only need to change the PATH for your particular script, no need
            to make the PATH global. You can even try something real quick with
            "env PATH=/opt/bin:$PATH /path/to/your/script"

            > 2. I have not seen any symlink /opt/bin/python. In
            > /opt/lib/ipkg/info/python25.list there is no file like
            /opt/bin/python.
            >
            What I meant was that "/opt/bin/ipkg install python" would install the
            /opt/bin/python symlink.

            >
            > 3. Seeing in /usr/bin that "python" (version 2.5.1) was a copy of
            > "python2.5" I renamed "python" to "python.org". Next step was to
            copy
            > /opt/bin/python2.5 to /opt/bin/python. When I call now "env python"
            > the python version 2.5.2 from /opt/bin/ was called.
            > Is that a good solution?
            >
            See 2.

            Good luck,

            -Brian
          • reuter.rudolf
            Hello Brian, Thanks again for your quick help. Unfortunately I did not found the python package in /opt/lib/ipkg/lists/optware. Now with your help it is
            Message 5 of 6 , Dec 9, 2008
            • 0 Attachment
              Hello Brian,
              Thanks again for your quick help. Unfortunately I did not found the
              "python" package in /opt/lib/ipkg/lists/optware. Now with your help it
              is clear to me, and it worked.
              It is always amazing to see how much knowledge you have about Linux.
              And it is very friendly from from you to help others, which are not on
              your high level.
              Still one question of curiosity:
              I have seen under optware python24, python25, python26 and python30
              packages. The package "python" symlinks now to python25. Hence, I
              guess this is the most stable one, concerning the use of external
              modules. Which events will then shift the symlink to a newer version,
              e.g. python26?
              With best regards, Rudy

              --- In nslu2-linux@yahoogroups.com, "Brian Zhou" <b88zhou@...> wrote:
              >
              > > 1. Moving /opt/bin/ in file /etc/profile to the first place in the
              > > PATH statement showed the problem that WinSCP no longer worked.
              > > Therefore I left /opt/bin at the end of PATH. Test with $ env.
              > >
              > You only need to change the PATH for your particular script, no need
              > to make the PATH global. You can even try something real quick with
              > "env PATH=/opt/bin:$PATH /path/to/your/script"
              >
              > > 2. I have not seen any symlink /opt/bin/python. In
              > > /opt/lib/ipkg/info/python25.list there is no file like
              > /opt/bin/python.
              > >
              > What I meant was that "/opt/bin/ipkg install python" would install the
              > /opt/bin/python symlink.
              >
              > >
              > > 3. Seeing in /usr/bin that "python" (version 2.5.1) was a copy of
              > > "python2.5" I renamed "python" to "python.org". Next step was to
              > copy
              > > /opt/bin/python2.5 to /opt/bin/python. When I call now "env python"
              > > the python version 2.5.2 from /opt/bin/ was called.
              > > Is that a good solution?
              > >
              > See 2.
              >
              > Good luck,
              >
              > -Brian
              >
            • Brian Zhou
              ... version, ... Currently most python packages have py24 and py25 subpackages. My plan is: 1. Start move from (py24-foo, py25-foo) to (py25-foo, py26-foo); 2.
              Message 6 of 6 , Dec 9, 2008
              • 0 Attachment
                --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@...>
                wrote:
                >
                > Still one question of curiosity:
                > I have seen under optware python24, python25, python26 and python30
                > packages. The package "python" symlinks now to python25. Hence, I
                > guess this is the most stable one, concerning the use of external
                > modules. Which events will then shift the symlink to a newer
                version,
                > e.g. python26?

                Currently most python packages have py24 and py25 subpackages.

                My plan is:

                1. Start move from (py24-foo, py25-foo) to (py25-foo, py26-foo);
                2. When most python packages have been moved, switch the python
                symlink;
                3. Add py30-pkg on a per-request basis. python30 won't be the default
                for a while, but people are encouraged to test python30 and py30
                packages.

                Feedback welcome,

                -Brian Zhou
              Your message has been successfully submitted and would be delivered to recipients shortly.