NumPy: build script not finding correct python version

Rich Shepard rshepard at appl-ecosys.com
Sun Jan 3 10:13:22 EST 2021


I'm trying to rebuild numpy-1.18.2 using the newly installed Python-3.9.1.
The script fails when running setup.py:
Traceback (most recent call last):
   File "setup.py", line 32, in <module>
     raise RuntimeError("Python version >= 3.5 required.")
RuntimeError: Python version >= 3.5 required.

When I invoke python3 from the command line the version is correctly
indentified:
$ python3
Python 3.9.1 (default, Dec 29 2020, 15:09:15) 
[GCC 5.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info[:2]
(3, 9)
>>>

Ignoring the large explanatory comment the lines above that throwing the
error are:
from __future__ import division, print_function

DOCLINES = (__doc__ or '').split("\n")

import os
import sys
import subprocess
import textwrap
import sysconfig


if sys.version_info[:2] < (3, 5):
     raise RuntimeError("Python version >= 3.5 required.")

I'm not seeing why sys.version_info is not finding the installed version
within the script and need insight from others with greater Python knowledge
than I have.

TIA,

Rich



More information about the Python-list mailing list