Python Forum
Attempt to build python 3.7.0 on OpenSuse Leap 15
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt to build python 3.7.0 on OpenSuse Leap 15
#1
I attempted to build Python 3.7.0 on OpenSuse Leap 15.
The compile was successful (or at least it got to testing phase), but failed on _hashlib with following error.
UserWarning: Did a C extension fail to compile? No module named '_hashlib' warnings.warn('Did a C extension fail to compile? %s' % error)
I was attempting to create a tutorial for doing this. I think I had enough for one day, and will pick up again tomorrow.

If anyone has had a similar experience, I'd like to know the resolution.

Here's my step by step up to the error:
Output:
Step 1: If you don't already have a source repository for python, do the following: A. cd to your chosen location for a python repository B. mkdir PythonSource C. cd Python Source D. mkdir OpenSuse E. cd OpenSuse F. mkdir Python3.7.0 G. cd Python3.7.0 Step 2: If you don't have a favorite editor, I suggest downloading notepadqq (Almost if not identical to Notepad++) sudo zipper install notepadqq Step 3: Download python source: https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz Step 4: Make sure compiler present: which gcc A. If not found: sudo zipper install gcc Step 5: Unzip tar file: tar zxvf ./Python-3.7.0.tgz Step 6: Change directory to Python-3.7.0: cd Python-3.7.0/ Step 7: Create makefile: ./configure --prefix=/opt/python3.7.0 --with-pydebug --enable-optimizations --enable-shared A. If you don't see a makefile (with correct timestamp), you will need to find ouy why. B. Open Config.log in notepadqq and search for the part that comes between 'Core tests' and 'Cache variables' and see what went wrong. C. Usually this will only happen if a core dependency is missing, and that can be installed with zypper as above. Step 8: Once configure runs to completion, and you have a makefile, Run the makefile with command: make Step 9: After compile, tests will be run .. This can take quite some time: A. Example output: Run tests sequentially 0:00:00 load avg: 1.08 [ 1/415] test_grammar 0:00:00 load avg: 1.08 [ 2/415] test_opcodes 0:00:00 load avg: 1.08 [ 3/415] test_dict 0:00:01 load avg: 1.08 [ 4/415] test_builtin 0:00:02 load avg: 1.08 [ 5/415] test_exceptions 0:00:05 load avg: 1.07 [ 6/415] test_types 0:00:05 load avg: 1.07 [ 7/415] test_unittest 0:00:15 load avg: 1.14 [ 8/415] test_doctest 0:00:20 load avg: 1.13 [ 9/415] test_doctest2 0:00:20 load avg: 1.13 [ 10/415] test_support 0:00:40 load avg: 1.09 [ 11/415] test___all__ B. When encountered, testing errors will look like: /run/media/Larz60p/Development/development/downloads/p-r/p/pv-pz/pyo-pyz/python/OpenSuse/Python-3.7.0/Python-3.7.0/Lib/test/test_hashlib.py:90: UserWarning: Did a C extension fail to compile? No module named '_hashlib' warnings.warn('Did a C extension fail to compile? %s' % error) To find the cause (this specific error), search config.log
Reply


Messages In This Thread
Attempt to build python 3.7.0 on OpenSuse Leap 15 - by Larz60+ - Jun-29-2018, 10:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  attempt to split values from within a dataframe column mbrown009 8 2,349 Apr-10-2023, 02:06 AM
Last Post: mbrown009

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020