I’ve got a clean installation of the master branch of devstack running on localhost.

Trying to build a python virtual environment based on python 3.8 and getting errors while gcc is compiling numpy.

Background: On Ubuntu 16.04 my python 3.8.0 is built from sources.

python3.8 -m venv venv

source venv/bin/activate

sudo -H pip install -r requirements/edx/development.txt --exists-action w

…

Here’s the last bit of the output where errors are showing up.

```
gcc -pthread -shared build/temp.linux-x86_64-3.8/build/src.linux-x86_64-3.8/numpy/linalg/umath_linalg.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/python_xerbla.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_z_lapack.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_c_lapack.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_d_lapack.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_s_lapack.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_lapack.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_blas.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c_config.o build/temp.linux-x86_64-3.8/numpy/linalg/lapack_lite/f2c.o -Lbuild/temp.linux-x86_64-3.8 -lnpymath -o build/lib.linux-x86_64-3.8/numpy/linalg/_umath_linalg.cpython-38-x86_64-linux-gnu.so
building 'numpy.random.mtrand' extension
compiling C sources
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
creating build/temp.linux-x86_64-3.8/numpy/random
creating build/temp.linux-x86_64-3.8/numpy/random/mtrand
compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/python-3.8.0/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c'
gcc: numpy/random/mtrand/mtrand.c
numpy/random/mtrand/mtrand.c: In function ‘PyInit_mtrand’:
numpy/random/mtrand/mtrand.c:42765:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
__pyx_type_6mtrand_RandomState.tp_print = 0;
^
In file included from /opt/python-3.8.0/include/python3.8/object.h:746:0,
from /opt/python-3.8.0/include/python3.8/pytime.h:6,
from /opt/python-3.8.0/include/python3.8/Python.h:85,
from numpy/random/mtrand/mtrand.c:4:
/opt/python-3.8.0/include/python3.8/cpython/object.h:260:30: note: declared here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx_PyCFunction_FastCall’:
numpy/random/mtrand/mtrand.c:44374:12: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’:
numpy/random/mtrand/mtrand.c:44793:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44794:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44795:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionReset’:
numpy/random/mtrand/mtrand.c:44802:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44803:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44804:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c:44805:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
numpy/random/mtrand/mtrand.c:44806:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
numpy/random/mtrand/mtrand.c:44807:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__GetException’:
numpy/random/mtrand/mtrand.c:44862:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44863:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44864:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c:44865:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
numpy/random/mtrand/mtrand.c:44866:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
numpy/random/mtrand/mtrand.c:44867:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
numpy/random/mtrand/mtrand.c: In function ‘PyInit_mtrand’:
numpy/random/mtrand/mtrand.c:42765:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
__pyx_type_6mtrand_RandomState.tp_print = 0;
^
In file included from /opt/python-3.8.0/include/python3.8/object.h:746:0,
from /opt/python-3.8.0/include/python3.8/pytime.h:6,
from /opt/python-3.8.0/include/python3.8/Python.h:85,
from numpy/random/mtrand/mtrand.c:4:
/opt/python-3.8.0/include/python3.8/cpython/object.h:260:30: note: declared here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx_PyCFunction_FastCall’:
numpy/random/mtrand/mtrand.c:44374:12: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’:
numpy/random/mtrand/mtrand.c:44793:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44794:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44795:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionReset’:
numpy/random/mtrand/mtrand.c:44802:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44803:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44804:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c:44805:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
numpy/random/mtrand/mtrand.c:44806:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
numpy/random/mtrand/mtrand.c:44807:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
numpy/random/mtrand/mtrand.c: In function ‘__Pyx__GetException’:
numpy/random/mtrand/mtrand.c:44862:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
numpy/random/mtrand/mtrand.c:44863:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
numpy/random/mtrand/mtrand.c:44864:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
numpy/random/mtrand/mtrand.c:44865:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
numpy/random/mtrand/mtrand.c:44866:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
numpy/random/mtrand/mtrand.c:44867:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/python-3.8.0/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.8/numpy/core/src/private -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.8/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.8/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
----------------------------------------
```

## ERROR: Command errored out with exit status 1: /opt/python-3.8.0/bin/python3.8 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-c_v5m4ih/numpy/setup.py’"’"’; **file**=’"’"’/tmp/pip-install-c_v5m4ih/numpy/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(**file**);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, **file**, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-b33yb128/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-f_jaq2_e/overlay --compile Check the logs for full command output.

WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.

You should consider upgrading via the ‘pip install --upgrade pip’ command.

ERROR: Command errored out with exit status 1: /opt/python-3.8.0/bin/python3.8 /opt/python-3.8.0/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f_jaq2_e/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple – wheel setuptools Cython ‘numpy==1.9.3; python_version==’"’"‘3.5’"’"’’ ‘numpy==1.12.1; python_version==’"’"‘3.6’"’"’’ ‘numpy==1.13.1; python_version>=’"’"‘3.7’"’"’’ Check the logs for full command output.

WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.

You should consider upgrading via the ‘pip install --upgrade pip’ command.

(venv) marshall@samson:/srv/raiddisk/edx/edx-platform$