Skip to content

Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ #78239

Closed

Description

@tkandell
mannequin
BPO 34058
Nosy @terryjreedy, @vstinner, @cooperlees
Superseder
  • bpo-1294959: Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE
  • Files
  • configure.log: Output of ./configure for Python 3.7.0 on linux 4.4.114-42-default openSUSE 42.3
  • make.log: The output of make with no parameters (after make clean)
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-03-11.10:01:32.985>
    created_at = <Date 2018-07-06.00:53:40.606>
    labels = ['3.7', 'type-bug', 'expert-installation']
    title = 'Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/'
    updated_at = <Date 2020-03-11.10:01:32.984>
    user = 'https://bugs.python.org/tkandell'

    bugs.python.org fields:

    activity = <Date 2020-03-11.10:01:32.984>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-11.10:01:32.985>
    closer = 'vstinner'
    components = ['Installation']
    creation = <Date 2018-07-06.00:53:40.606>
    creator = 'tkandell'
    dependencies = []
    files = ['47674', '47675']
    hgrepos = []
    issue_num = 34058
    keywords = []
    message_count = 13.0
    messages = ['321145', '321199', '321200', '321204', '321205', '321206', '321207', '321208', '321209', '321211', '345363', '363898', '363899']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'vstinner', 'cooperlees', 'tkandell']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '1294959'
    type = 'behavior'
    url = 'https://bugs.python.org/issue34058'
    versions = ['Python 3.7']

    Activity

    1. tkandell commented on Jul 6, 2018

      tkandellmannequin
      MannequinAuthor

      The default Python 3.7 install (./configure with no parameters) does not work (at least) on openSUSE Leap 42.3.

      Python3 gives a ModuleNotFoundError: No module named 'readline'
      error, and pip3 has a ModuleNotFoundError: No module named '_socket' error, because the site libraries cannot be found.

      The fix is to manually:
      sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload

      The same problem should also be present with a PYTHONHOME other than the default /usr/local .

      I suspect this is a more widespread problem than just openSUSE Leap 42.3, and may exist in other distros as well.

      The fix should be for make install to automatically create the symbolic link for the $PYTHONHOME/lib64/python3.7/lib-dynload directory in $PYTHONHOME/lib/python3.7/ .

    2. terryjreedy commented on Jul 7, 2018

      @terryjreedy
      Member

      A crash, for the tracker, is failed execution without a Python exception and trackback.

      Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently green. We don't have one for SUSE, open or other wise.

      If you have not yet reported the issue to openSUSE, I would do so in case this is something they should deal with.

      Victor, do you have anything to add?

    3. added
      type-bugAn unexpected behavior, bug, or error
      and removed
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Jul 7, 2018
    4. tkandell commented on Jul 7, 2018

      tkandellmannequin
      MannequinAuthor

      This isn't for the OpenSUSE official build itself, just compiling and installing from source on OpenSUSE 42.3. Without the symlink, and also with a wrong PYTHONHOME, pip coredumps.

    5. terryjreedy commented on Jul 7, 2018

      @terryjreedy
      Member

      Did you get the source from openSUSE or from python.org?

    6. vstinner commented on Jul 7, 2018

      @vstinner
      Member

      Can we please recommpile Python from scratch and attach the output of make? Example:

      ./configure
      make 2>&1 | tee log

      And attach log to this ticket.

    7. vstinner commented on Jul 7, 2018

      @vstinner
      Member

      For readline, you probably have to install a dependency like: libreadline-dev.

    8. vstinner commented on Jul 7, 2018

      @vstinner
      Member

      Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently
      green. We don't have one for SUSE, open or other wise.

      We have SLES buildbots, that's OpenSUSE no?

    9. tkandell commented on Jul 7, 2018

      tkandellmannequin
      MannequinAuthor

      I got the source directly from www.python.org

    10. tkandell commented on Jul 7, 2018

      tkandellmannequin
      MannequinAuthor

      ./configure output
      default, no parameters

    11. tkandell commented on Jul 7, 2018

      tkandellmannequin
      MannequinAuthor

      The output of make after a make clean is attached.

      For readline, on openSUSE 42.3 you have to install ncurses-devel, not libreadline-dev. The instructions aren't clear about this either, or the fact that an ncurses or readline development library has to be installed separately. However, this didn't cause the "readline" problem, since the shared libraries were in /usr/local/lib64 instead of /usr/local/lib, and so they couldn't be found in any case.

    12. cooperlees commented on Jun 12, 2019

      cooperleesmannequin
      Mannequin

      I also have the same problem with _socket that was Fixed on the latest version of CentOS 7 building with gcc 4.8.5.

      Adding:
      sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload

      Allowed the .so to be found and the import to work.

    13. vstinner commented on Mar 11, 2020

      @vstinner
      Member

      bpo-1294959 has been fixed by commit 8510f43, but this issue is about "./configure with no parameters".

      This issue seems to be about OpenSuSE downstream patches: "just compiling and installing from source on OpenSUSE 42.3."

      I found multiple similar old issues.

      bpo-15631: "Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders", "error: ImportError: No module named 'atexit'". The reporter used downstream patch: "I applied the OpenSUSE patch".

      => closed as a duplicate of bpo-1294959

      • bpo-18092: "Python 2.7.5 installation broken on OpenSuse 12.2", error: "ImportError: No module named _collections". The reporter never explained how Python was configured: "Please provide exactly what ./configure options you used to build Python and any "make install" options."

      => closed as a duplicate of bpo-1294959

      • bpo-30633: "Python 3.6.1 installation issues on OpenSuse 42.1: ModuleNotFoundError: No module named 'encodings'", error: "Fatal Python error: Py_Initialize: Unable to get the locale encoding". Same reporter name than bpo-18092 "Andreas Jung", but different bugs.python.org login name ("zopyx" vs "Andreas.Jung". The reporter says that he used "the standard ./configure --prefix=... --enable-optimizations" but not if he applied any OpenSuSE downstream patch.

      => closed as out of date in 2019 after 2 years of inactivity

    14. vstinner commented on Mar 11, 2020

      @vstinner
      Member

      This issuse is now 2 years old and it doesn't have a clear description. It started with "just compiling and installing from source on OpenSUSE 42.3", then switched to "I got the source directly from www.python.org" to finish with "I also have the same problem (...) on the latest version of CentOS 7".

      I close the issue.

      If someone wants to reopen the issue, please clearly explains:

      • how you get Python
      • did you apply any patch on it
      • how did you configure Python? (configure command)
      • how did you built Python?
      • how did you install Python?
      • how do you run Python?
      • what is your operating system?
      • what is your locale (LC_ALL, LC_CTYPE and LANG environment variable)?
      • do you have any environment variable with a name starting with PYTHON?

      So far, we only got unclear bug reports with partial information and we could only guess what the reporter did.

      Since this issue started with OpenSuSE downstream patches, I mark also this issue as a duplicate of bpo-1294959.

    15. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions