• Cannot install pkg_resources using pip

    From Rich Shepard@21:1/5 to All on Sun Apr 16 13:42:10 2023
    Python3-3.9.10 installed on this Slackware64-14.2 desktop. Trying to run
    meson to build an application I'm told it's missing pkg_resources, which is part of setuptools. The command fails:
    # pip install setuptools
    bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or directory

    There is no python3.7 here:
    # ls /usr/bin/python3.7
    ls: cannot access '/usr/bin/python3.7': No such file or directory

    How do I clean this up?

    TIA,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Rich Shepard on Sun Apr 16 17:03:43 2023
    On 4/16/2023 4:42 PM, Rich Shepard wrote:
    Python3-3.9.10 installed on this Slackware64-14.2 desktop. Trying to run meson to build an application I'm told it's missing pkg_resources, which is part of setuptools. The command fails:
    # pip install setuptools
    bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or directory

    There is no python3.7 here:
    # ls /usr/bin/python3.7
    ls: cannot access '/usr/bin/python3.7': No such file or directory

    How do I clean this up?

    What is there to clean up? If you have Python 3.9 installed, why are
    you fooling around trying to run Python 3.7? It seems you are not
    telling us something ...

    It's better to always run pip with the version of Python that you intend
    to use. If that is launched when you type "python3", then run pip this way:

    python3 -m pip

    If instead you want to use, say, python3.9, then type this:

    python3.9 -m pip

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to Rich Shepard on Sun Apr 16 15:34:25 2023
    On Sun, 16 Apr 2023, Rich Shepard wrote:

    I'll download the installer from there.

    But, I still cannot install the pkg_resources module that meson wants to
    start the build of pulseaudio-equalizer:
    # pip install pkg_resources
    ERROR: Could not find a version that satisfies the requirement pkg_resources (from versions: none)
    ERROR: No matching distribution found for pkg_resources

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to Thomas Passin on Sun Apr 16 15:27:56 2023
    On Sun, 16 Apr 2023, Thomas Passin wrote:

    It worked then because your path found a pip script. When there are more
    than one Python installations, it can be unclear which one will get run, depending on how the path got set up after the last version was installed.

    Thomas,

    I probably last used pip with a python-3.7 version.

    To check your version of Python, run
    python3 -V

    $ python3 -V
    Python 3.9.10

    Then try to run pip:
    python3.9 -m pip

    $ python3.9 -m pip
    /usr/bin/python3.9: No module named pip

    If pip has not been installed (very possible on Linux), then you will need to get it. If python3.9 is not the system-upgraded version, then do an internet search for "linux python install pip". There's a pip website that has an installer for it. I never remember what it's called, so I always have to search for it myself.

    https://www.redhat.com/sysadmin/install-python-pip-linux

    I'll download the installer from ther.

    If it appears that python3.9 *is* the version installed by the system, then use the system installer to install the right version of pip - as I said above, the package name can vary across distros.

    It should have been installed with the upgrade to 3.9.10

    Your message doesn't seem to have been copied to the mailing list. If you don't mind, it could help other people if you copied it and this reply to
    the list.

    I always respond to the mail list if that's the 'reply to' address.
    Sometimes I don't check the address used in my reply, assuming it's correct.

    Thanks,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Rich Shepard on Sun Apr 16 23:08:56 2023
    On 4/16/2023 6:34 PM, Rich Shepard wrote:
    On Sun, 16 Apr 2023, Rich Shepard wrote:

    I'll download the installer from there.

    But, I still cannot install the pkg_resources module that meson wants to start the build of pulseaudio-equalizer:
    # pip install pkg_resources
    ERROR: Could not find a version that satisfies the requirement
    pkg_resources (from versions: none)
    ERROR: No matching distribution found for pkg_resources

    Rich


    Sorry, Rich, I've never dealt with this so someone else will have to
    give suggestions.

    I would try to see if there are any versions available. It could be
    that meson says it needs version x but only version y > x is available.
    Pip will quit but meson may very well work with the available version
    anyway. So I would try to install pkg_resources on its own, and then
    see if the meson build can succeed. No guarantees, but I've seen this
    work before. So

    python3.9 -m pip install --user pkg_resources

    Or, to see what versions if any are available:

    python3.9 -m pip install --user pkg_resources==
    # NO spaces allowed before the "==".

    There is a pip option to ignore the version specification and just leave
    the existing package installed as is, and this could help if the full installation wants to downgrade the pgk_resources that you just installed.

    You can also use the --dry-run option to see what would happen without
    actually changing anything.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Rich Shepard on Sun Apr 16 22:59:16 2023
    On 4/16/2023 6:27 PM, Rich Shepard wrote:
    On Sun, 16 Apr 2023, Thomas Passin wrote:
    [snip]


    It should have been installed with the upgrade to 3.9.10

    In my experience, on Windows pip is always included but on Linux hardly
    ever. I have always needed to install the system installer pip package
    or get it from the pip site, depending, as I wrote earlier, on whether
    your version of Python was installed by the system or not.

    [I'm no great Linux expert but I've had to go through this for probably
    a dozen VMs over the last few years].

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Rich Shepard on Mon Apr 17 00:07:13 2023
    On 4/16/2023 6:27 PM, Rich Shepard wrote:
    If pip has not been installed (very possible on Linux), then you will
    need to get it.  If python3.9 is not the system-upgraded version, then
    do an internet search for "linux python install pip". There's a pip
    website that has an installer for it. I never remember what it's
    called, so I always have to search for it myself.

    https://www.redhat.com/sysadmin/install-python-pip-linux

    I'll download the installer from ther.

    The page I was thinking of is

    https://pip.pypa.io/en/stable/installation/

    I found it by an internet search for "pip installer". It covers several
    ways to install pip on Linux, MacOS, and Windows. On Linux, use it for
    Python installations that were *not* installed by the system. Use the
    package manager if the Python installation or upgrade *was* installed by
    the system.

    That Redhat link basically uses the pypa.io instructions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to Thomas Passin on Mon Apr 17 05:45:51 2023
    On Sun, 16 Apr 2023, Thomas Passin wrote:

    Sorry, Rich, I've never dealt with this so someone else will have to give suggestions.

    Thomas,

    This is all new to me, too.

    I would try to see if there are any versions available. It could be that meson says it needs version x but only version y > x is available. Pip
    will quit but meson may very well work with the available version anyway.
    So I would try to install pkg_resources on its own, and then see if the
    meson build can succeed. No guarantees, but I've seen this work before. So python3.9 -m pip install --user pkg_resources

    Or, to see what versions if any are available:
    python3.9 -m pip install --user pkg_resources==
    # NO spaces allowed before the "==".

    Thank you. I'll give this a try.

    Regards,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From aapost@21:1/5 to Rich Shepard on Mon Apr 17 11:00:20 2023
    On 4/17/23 08:45, Rich Shepard wrote:
    On Sun, 16 Apr 2023, Thomas Passin wrote:

    Slackware isn't as straight forward in it's management as other distros
    (not standardized anyway). If this is someone elses install I would be
    cautious in using any advice I am providing, as it would be better for
    someone with familiarity with how they want the device set up to address
    the issues (such as if they prefer using some sort of package scheme or
    if doing everything from source is ok).

    That being said, if you start from python source (as in overwriting what
    is currently there and doing a fresh reinstall), you can download
    Python3.9, then run
    ./configure
    make
    make install

    after doing that, verify (python may still link to something old, that
    may be ok in this case, but good to note)
    python --version
    python3 --version
    python3.9 --version

    pkg_resources is inside of setuptools

    so you would run
    python3.9 -m pip install setuptools
    (might already be there with the reinstall)

    after that run
    python3.9

    then run
    import pkg_resources
    import setuptools
    to see if you get errors or successful imports

    if they import successfully, attempt to reinstall meson and ninja
    against your fresh python install
    python3.9 -m pip install meson
    python3.9 -m pip install ninja

    verify versions with
    meson -v
    ninja --version

    Then follow the instructions of the meson package from there (you
    mentioned some sort of pulseaudio-equalizer, depending on your desktop environment, you may run in to additional issues depending on how your slackware is setup).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Shepard@21:1/5 to aapost on Mon Apr 17 11:13:15 2023
    On Mon, 17 Apr 2023, aapost wrote:

    Slackware isn't as straight forward in it's management as other distros
    (not standardized anyway).

    I've used Slackware for 20 years; it's completely rationale and comfortable
    for me. :-)

    That being said, if you start from python source ...

    If worse came to worse, I'd reinstall the distro package.

    Thanks,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter J. Holzer@21:1/5 to Thomas Passin on Mon Apr 17 21:24:03 2023
    On 2023-04-16 17:03:43 -0400, Thomas Passin wrote:
    On 4/16/2023 4:42 PM, Rich Shepard wrote:
    Python3-3.9.10 installed on this Slackware64-14.2 desktop.
    [...]
    # pip install setuptools
    bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or directory

    There is no python3.7 here:
    # ls /usr/bin/python3.7
    ls: cannot access '/usr/bin/python3.7': No such file or directory

    How do I clean this up?

    What is there to clean up?

    There is a version of pip installed for a version of python which isn't installed. That's definitely not useful, so it should be cleaned up.

    As to how to do that:

    Find out which package /usr/bin/pip belongs to and deinstall or upgrade
    this package. How to find that package is a Slackware question, not a
    Python question. And since Rich wrote that he's been comfortably using Slackware for 20 years, I'll trust that he knows how to do that and just
    needed a little nudge into the right direction.

    hp

    --
    _ | Peter J. Holzer | Story must make more sense than reality.
    |_|_) | |
    | | | hjp@hjp.at | -- Charles Stross, "Creative writing
    __/ | http://www.hjp.at/ | challenge!"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmQ9nM4ACgkQ8g5IURL+ KF1wmw/+J4AH8VAIoTMkeDsnzOjEpTpyomj6k3K+Bdw0YIMj22e/x98YaRNJwrKm 0+jLPq9ziyeoQr5+xacFWJqfxxssVB6MjUGYrAQv8GWwWlQY/8tNfRsZOoDa/PSi oAyshtRxe01ihHr4h+GebrCEfdHlepL6V+gYdaugNLaa1gLPim8B7nXpDCC/woTo kt7JTm9VPkTamXnHh8bQLm7bJNifBbkiNa3e/svWSQ3FXXCecU9aMTOGUaRvRz2e V02A9PYWAAxjLTLZQKsao2p1rVGcoPGef1zCTkyuojw57TJB+Ui2fyIULLmzNCit 1MpUyrjmrIY3I7l7fh+6bhem7N0ak0DMm3RQYN1474CfVd1q351SGb+JlAB932p9 BS2VgLWWrWW+U798GIMvEMLRZmvOy2Frev10I1FeelxKsbyEPUP33vhJiYwK4bw5 0C9l7SBow2y/lQePQcUshYFj4txRQA0x11QCCPpv5jQ/+ICwlCno1W1bI9t/weqD EksoA/jHeRMdmmO1jwX3jWnrIFM0DoDuY6N5PuijzZ0xka7TFyRLoRi78fuPkWc8 mdBzfg59e30JMbDOi71ciznAk7O0DiYwIzhWBKIB9zcdPQIabx0iap80knLKfrUR k6yOKArkszj7usBA6wzPESzv4IDf+rZMmu+cHD4