Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install error building wheel with PEP 517 on Linux cluster #883

Open
cjperks7 opened this issue Dec 13, 2023 · 1 comment
Open

pip install error building wheel with PEP 517 on Linux cluster #883

cjperks7 opened this issue Dec 13, 2023 · 1 comment

Comments

@cjperks7
Copy link
Collaborator

Tried building tofu on a Linux cluster machine and got the following failure to download. I'll attach the most terminal output, I deleted some copy messages to meet character limit. In case there's an environment issue I'll also attach the module list readout in a following comment

[cjperks@eofe7 ~]$ pip install tofu
Defaulting to user installation because normal site-packages is not writeable
Collecting tofu
  Downloading tofu-1.7.5.tar.gz (4.6 MB)
     |████████████████████████████████| 4.6 MB 41 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting requests
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting Polygon3
  Using cached Polygon3-3.0.9.1.tar.gz (39 kB)
Requirement already satisfied: numpy in ./.local/lib/python3.8/site-packages (from tofu) (1.20.1)
Collecting cython>=0.26
  Using cached Cython-3.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
Requirement already satisfied: matplotlib in ./.local/lib/python3.8/site-packages (from tofu) (3.3.4)
Collecting contourpy
  Using cached contourpy-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB)
Collecting svg.path
  Using cached svg.path-6.3-py2.py3-none-any.whl (16 kB)
Collecting bsplines2d>=0.0.11
  Downloading bsplines2d-0.0.11-py3-none-any.whl (136 kB)
     |████████████████████████████████| 136 kB 41.7 MB/s 
Requirement already satisfied: scipy in ./.local/lib/python3.8/site-packages (from tofu) (1.6.0)
Collecting datastock>=0.0.34
  Downloading datastock-0.0.34-py3-none-any.whl (129 kB)
     |████████████████████████████████| 129 kB 50.5 MB/s 
Collecting astropy
  Using cached astropy-5.2.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (11.4 MB)
Collecting pyerfa>=2.0
  Using cached pyerfa-2.0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (749 kB)
Collecting PyYAML>=3.13
  Using cached PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (736 kB)
Requirement already satisfied: packaging>=19.0 in ./.local/lib/python3.8/site-packages (from astropy->bsplines2d>=0.0.11->tofu) (20.9)
Requirement already satisfied: pyparsing>=2.0.2 in ./.local/lib/python3.8/site-packages (from packaging>=19.0->astropy->bsplines2d>=0.0.11->tofu) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in ./.local/lib/python3.8/site-packages (from matplotlib->tofu) (2.8.1)
Requirement already satisfied: pillow>=6.2.0 in ./.local/lib/python3.8/site-packages (from matplotlib->tofu) (8.1.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib->tofu) (1.3.1)
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.8/site-packages (from matplotlib->tofu) (0.10.0)
Requirement already satisfied: six in ./.local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->tofu) (1.15.0)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.6-py3-none-any.whl (61 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.local/lib/python3.8/site-packages (from requests->tofu) (1.26.5)
Building wheels for collected packages: tofu, Polygon3
  Building wheel for tofu (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/software/python/3.8.3/bin/python3.8 /home/cjperks/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpy9robubr
       cwd: /tmp/pip-install-fhvf0d1q/tofu_3b613bb7a47f41b58f5f80b976e8109b
  Complete output (720 lines):
  
  Version for setup.py :  1.7.5
  
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-38
  copying _updateversion.py -> build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/tofu_helpers
  copying tofu_helpers/__init__.py -> build/lib.linux-x86_64-cpython-38/tofu_helpers
  copying tofu_helpers/openmp_helpers.py -> build/lib.linux-x86_64-cpython-38/tofu_helpers
  creating build/lib.linux-x86_64-cpython-38/scripts
  copying scripts/__init__.py -> build/lib.linux-x86_64-cpython-38/scripts


  copying tofu/tests/tests04_spectro/test_data/west_54046_xics.npz -> build/lib.linux-x86_64-cpython-38/tofu/tests/tests04_spectro/test_data
  running build_ext
  Compiling tofu/geom/_GG.pyx because it changed.
  [1/1] Cythonizing tofu/geom/_GG.pyx
  building 'tofu.geom._GG' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  INFO: C compiler: mpicc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
  
  creating build/temp.linux-x86_64-cpython-38
  creating build/temp.linux-x86_64-cpython-38/tofu
  creating build/temp.linux-x86_64-cpython-38/tofu/geom
  INFO: compile options: '-I/tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/software/python/3.8.3/include/python3.8 -c'
  extra options: '-O3 -Wall -fno-wrapv'
  INFO: mpicc: tofu/geom/_GG.c
  In file included from /home/software/python/3.8.3/include/python3.8/pyport.h:212:0,
                   from /home/software/python/3.8.3/include/python3.8/Python.h:63,
                   from tofu/geom/_GG.c:34:
  /home/software/intel/2017-01/include/math.h:108:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
   # error "This Intel <math.h> is for use with only the Intel compilers!"
     ^~~~~
  In file included from /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940:0,
                   from /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                   from tofu/geom/_GG.c:1238:
  /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  In file included from tofu/geom/_GG.c:1521:0:
  /home/software/intel/2017-01/include/complex.h:30:3: error: #error "This Intel <complex.h> is for use with only the Intel compilers!"
   # error "This Intel <complex.h> is for use with only the Intel compilers!"
     ^~~~~
  In file included from tofu/geom/_GG.c:1600:0:
  /home/software/intel/2017-01/include/stdatomic.h: In function ‘atomic_flag_test_and_set’:
  /home/software/intel/2017-01/include/stdatomic.h:135:12: warning: implicit declaration of function ‘__atomic_flag_test_and_set_explicit’ [-Wimplicit-function-declaration]
       return __atomic_flag_test_and_set_explicit(&_A->_Val, memory_order_seq_cst);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/software/intel/2017-01/include/stdatomic.h: In function ‘atomic_flag_clear’:
  /home/software/intel/2017-01/include/stdatomic.h:169:5: warning: implicit declaration of function ‘__atomic_flag_clear_explicit’ [-Wimplicit-function-declaration]
       __atomic_flag_clear_explicit(&_A->_Val, memory_order_seq_cst);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tofu/geom/_GG.c: In function ‘__pyx_pf_4tofu_4geom_3_GG_60vignetting’:
  tofu/geom/_GG.c:81178:61: warning: passing argument 1 of ‘__pyx_f_4tofu_4geom_17_raytracing_tools_compute_3d_bboxes’ from incompatible pointer type [-Wincompatible-pointer-types]
     __pyx_f_4tofu_4geom_17_raytracing_tools_compute_3d_bboxes(__pyx_v_data, (&(*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_lnvert.data) + __pyx_t_15)) )))), __pyx_v_nvign, (&(__pyx_v_lbounds[0])), __pyx_v_num_threads); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2861, __pyx_L1_error)
                                                               ^~~~~~~~~~~~
  tofu/geom/_GG.c:81178:61: note: expected ‘const double * const*’ but argument is of type ‘double **’
  /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/setuptools/_distutils/extension.py:134: UserWarning: Unknown Extension options: 'language_level'
    warnings.warn(msg)
  /tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'use_scm_version'
    warnings.warn(msg)
  warning: tofu/geom/_vignetting_tools.pxd:93:60: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  performance hint: tofu/geom/_GG.pyx:3516:5: Exception check on 'NEW_LOS_sino_Tor' will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on the function to allow an error code to be returned.
  performance hint: tofu/geom/_GG.pyx:3577:5: Exception check on 'NEW_los_sino_tor_vec' will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on the function to allow an error code to be returned.
  performance hint: tofu/geom/_GG.pyx:6053:29: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6054:29: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6055:29: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6062:23: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6062:41: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6062:59: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6063:25: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6063:43: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6063:61: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6064:25: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6064:43: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6064:61: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6075:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6076:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6077:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6078:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6079:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6080:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6081:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6082:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6083:30: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6084:26: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6085:26: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:6086:26: Index should be typed for more efficient access
  performance hint: tofu/geom/_GG.pyx:3539:32: Exception check will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on the function to allow an error code to be returned.
  performance hint: tofu/geom/_GG.pyx:3623:40: Exception check will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on the function to allow an error code to be returned.
  performance hint: tofu/geom/_GG.pyx:4116:42: Exception check will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on the function to allow an error code to be returned.
  error: Command "mpicc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-env-ap6lx0k5/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/software/python/3.8.3/include/python3.8 -c tofu/geom/_GG.c -o build/temp.linux-x86_64-cpython-38/tofu/geom/_GG.o -O3 -Wall -fno-wrapv" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for tofu
  Building wheel for Polygon3 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/software/python/3.8.3/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fhvf0d1q/polygon3_e967d3fcd5ec4808a14030344047a364/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fhvf0d1q/polygon3_e967d3fcd5ec4808a14030344047a364/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-nertlvqs
       cwd: /tmp/pip-install-fhvf0d1q/polygon3_e967d3fcd5ec4808a14030344047a364/
  Complete output (41 lines):
  Using NumPy extension!
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/Polygon
  copying Polygon/__init__.py -> build/lib.linux-x86_64-3.8/Polygon
  copying Polygon/Utils.py -> build/lib.linux-x86_64-3.8/Polygon
  copying Polygon/Shapes.py -> build/lib.linux-x86_64-3.8/Polygon
  copying Polygon/IO.py -> build/lib.linux-x86_64-3.8/Polygon
  running build_ext
  building 'Polygon.cPolygon' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  mpicc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DDEFAULT_STYLE=STYLE_LIST -DWITH_NUMPY=1 -Isrc -I/home/cjperks/.local/lib/python3.8/site-packages/numpy/core/include -I/home/software/python/3.8.3/include/python3.8 -c src/gpc.c -o build/temp.linux-x86_64-3.8/src/gpc.o
  In file included from src/gpc.c:43:0:
  /home/software/intel/2017-01/include/math.h:108:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
   # error "This Intel <math.h> is for use with only the Intel compilers!"
     ^~~~~
  src/gpc.c:70:22: error: ‘DBL_EPSILON’ undeclared here (not in a function)
   double GPC_EPSILON = DBL_EPSILON;
                        ^~~~~~~~~~~
  src/gpc.c: In function ‘create_contour_bboxes’:
  src/gpc.c:940:18: error: ‘DBL_MAX’ undeclared (first use in this function)
       box[c].xmin= DBL_MAX;
                    ^~~~~~~
  src/gpc.c:940:18: note: each undeclared identifier is reported only once for each function it appears in
  src/gpc.c: In function ‘gpc_write_polygon’:
  src/gpc.c:1074:15: error: ‘DBL_DIG’ undeclared (first use in this function)
                 DBL_DIG, p->contour[c].vertex[v].x,
                 ^~~~~~~
  src/gpc.c: In function ‘gpc_polygon_clip’:
  src/gpc.c:1215:10: error: ‘DBL_MAX’ undeclared (first use in this function)
       px= -DBL_MAX;
            ^~~~~~~
  src/gpc.c: In function ‘gpc_tristrip_clip’:
  src/gpc.c:1868:10: error: ‘DBL_MAX’ undeclared (first use in this function)
       px= -DBL_MAX;
            ^~~~~~~
  error: command 'mpicc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for Polygon3
  Running setup.py clean for Polygon3
Failed to build tofu Polygon3
ERROR: Could not build wheels for tofu which use PEP 517 and cannot be installed directly
@cjperks7
Copy link
Collaborator Author

[cjperks@eofe7 ~]$ module list
Currently Loaded Modulefiles:
  1) psfc/mdsplus                      9) gcc/6.2.0(default)
  2) psfc/config                      10) slurm/14.11
  3) intel/2017-01                    11) fftw3/openmpi/open64/64/3.3.3
  4) impi/2017-01                     12) mpich/ge/gcc/64/3.1
  5) psfc/mkl/17                      13) engaging/idl/8.5
  6) engaging/openmpi/1.8.8(default)  14) engaging/zlib/1.2.8
  7) sqlite3/3.22.0                   15) engaging/szip/2.1
  8) python/3.8.3                     16) psfc/hdf5/intel-17/1.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant