enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.28k stars 282 forks source link

Error 'Numpy is required to build Mayavi correctly, please install it first' when installing Mayavi #1167

Closed Stefan-1313 closed 1 year ago

Stefan-1313 commented 1 year ago

Numpy is required to build Mayavi correctly, please install it first when install Mayavi.

In the pas I have build a Docker image which contained Mayavi many times. Last week everything was still working. Today I noticed that building of the containers goes wrong!

This is the error I get:

   ********************************************************************************

       Numpy is required to build Mayavi correctly, please install it first.

   ********************************************************************************

But Numpy is already installed. Can anyone help to fix installing Mayavi so I can continue using it? :)

For building the Docker image I use this Docker file (DockerfileMin.txt):

# Base docker from Microsoft for Azure Machine Learning.
FROM continuumio/miniconda3

# For successfully installing VTK package which is a dependency of Mayavi.
ENV QT_QPA_PLATFORM offscreen

# Install xvfb for starting a X server using virtual display (required for Mayavi).
RUN apt-get update && \
    apt-get install -y \
    xvfb

# Create conda environment.
COPY conda_requirements_min.yml /data/conda_requirements_min.yml
RUN conda env create --file=/data/conda_requirements_min.yml

And this conda requirements file (conda_requirements_min.yml):

name: mayavitest
channels:
- conda-forge
dependencies:
- python=3.9 
- numpy=1.23.1
- vtk=9.1.0
- pip=22.2.2
- pip:
   - xvfbwrapper==0.2.9
   - mayavi==4.8.0

I use this command to build the Docker image:

docker build -t testbuild:mayavionly -f DockerfileMin.txt .

The full docker build output is:

 => [internal] load build definition from DockerfileMin.txt                                                                                                                                                                                                               0.0s
 => => transferring dockerfile: 39B                                                                                                                                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/continuumio/miniconda3:latest                                                                                                                                                                                                  1.4s
 => [1/4] FROM docker.io/continuumio/miniconda3@sha256:977263e8d1e476972fddab1c75fe050dd3cd17626390e874448bd92721fd659b                                                                                                                                                   0.0s
 => [internal] load build context                                                                                                                                                                                                                                         0.0s
 => => transferring context: 4.01kB                                                                                                                                                                                                                                       0.0s
 => CACHED [2/4] RUN apt-get update &&     apt-get install -y  xvfb                                                                                                                                                                                                       0.0s
 => [3/4] COPY conda_env_definition_min.yml /data/conda_env_definition_min.yml                                                                                                                                                                                            0.0s
 => ERROR [4/4] RUN conda env create --file=/data/conda_env_definition_min.yml                                                                                                                                                                                          233.1s
------
 > [4/4] RUN conda env create --file=/data/conda_env_definition_min.yml:
#8 0.817 Collecting package metadata (repodata.json): ...working... done
#8 54.45 Solving environment: ...working... done
#8 69.73
#8 69.73
#8 69.73 ==> WARNING: A newer version of conda exists. <==
#8 69.73   current version: 4.12.0
#8 69.73   latest version: 4.13.0
#8 69.73
#8 69.73 Please update conda by running
#8 69.73
#8 69.73     $ conda update -n base -c defaults conda
#8 69.73
#8 69.73
#8 69.75
#8 69.75 Downloading and Extracting Packages
xcb-util-renderutil- | 15 KB     | ########## | 100%
pcre-8.45            | 253 KB    | ########## | 100%
lame-3.100           | 496 KB    | ########## | 100%
c-ares-1.18.1        | 113 KB    | ########## | 100%
svt-av1-1.2.0        | 3.4 MB    | ########## | 100%
libdrm-2.4.112       | 283 KB    | ########## | 100%
expat-2.4.8          | 187 KB    | ########## | 100%
aom-3.4.0            | 2.7 MB    | ########## | 100%
zlib-1.2.12          | 91 KB     | ########## | 100%
libtiff-4.4.0        | 642 KB    | ########## | 100%
pip-22.2.2           | 1.5 MB    | ########## | 100%
jack-1.9.18          | 643 KB    | ########## | 100%
bzip2-1.0.8          | 484 KB    | ########## | 100%
tzdata-2022b         | 118 KB    | ########## | 100%
libuuid-2.32.1       | 28 KB     | ########## | 100%
wheel-0.37.1         | 31 KB     | ########## | 100%
libglu-9.0.0         | 413 KB    | ########## | 100%
xorg-libxext-1.3.4   | 54 KB     | ########## | 100%
tbb-devel-2021.5.0   | 955 KB    | ########## | 100%
libev-4.33           | 104 KB    | ########## | 100%
xorg-fixesproto-5.0  | 9 KB      | ########## | 100%
libevent-2.1.10      | 1.1 MB    | ########## | 100%
mysql-common-8.0.30  | 1.9 MB    | ########## | 100%
jsoncpp-1.9.5        | 190 KB    | ########## | 100%
ncurses-6.3          | 1002 KB   | ########## | 100%
python_abi-3.9       | 4 KB      | ########## | 100%
libllvm14-14.0.6     | 35.2 MB   | ########## | 100%
ld_impl_linux-64-2.3 | 667 KB    | ########## | 100%
_openmp_mutex-4.5    | 23 KB     | ########## | 100%
libblas-3.9.0        | 13 KB     | ########## | 100%
tbb-2021.5.0         | 1.9 MB    | ########## | 100%
xorg-libxfixes-5.0.3 | 18 KB     | ########## | 100%
hdf5-1.12.2          | 3.5 MB    | ########## | 100%
nspr-4.32            | 233 KB    | ########## | 100%
libzip-1.9.2         | 97 KB     | ########## | 100%
libglib-2.72.1       | 3.1 MB    | ########## | 100%
glib-tools-2.72.1    | 107 KB    | ########## | 100%
libcups-2.3.3        | 4.5 MB    | ########## | 100%
nss-3.78             | 2.1 MB    | ########## | 100%
x265-3.5             | 3.2 MB    | ########## | 100%
openh264-2.3.0       | 1.5 MB    | ########## | 100%
fftw-3.3.10          | 6.5 MB    | ########## | 100%
xorg-libxau-1.0.9    | 13 KB     | ########## | 100%
double-conversion-3. | 86 KB     | ########## | 100%
libgomp-12.1.0       | 459 KB    | ########## | 100%
gettext-0.19.8.1     | 3.6 MB    | ########## | 100%
libunistring-0.9.10  | 1.4 MB    | ########## | 100%
krb5-1.19.3          | 1.4 MB    | ########## | 100%
vtk-9.1.0            | 44.1 MB   | ########## | 100%
font-ttf-source-code | 684 KB    | ########## | 100%
libnghttp2-1.47.0    | 808 KB    | ########## | 100%
libffi-3.4.2         | 57 KB     | ########## | 100%
libgcc-ng-12.1.0     | 940 KB    | ########## | 100%
libpng-1.6.37        | 371 KB    | ########## | 100%
libva-2.15.0         | 184 KB    | ########## | 100%
libgfortran-ng-12.1. | 23 KB     | ########## | 100%
x264-1!164.3095      | 877 KB    | ########## | 100%
gnutls-3.7.6         | 2.1 MB    | ########## | 100%
pthread-stubs-0.4    | 5 KB      | ########## | 100%
xorg-libxt-1.2.1     | 375 KB    | ########## | 100%
_libgcc_mutex-0.1    | 3 KB      | ########## | 100%
glew-2.1.0           | 647 KB    | ########## | 100%
xorg-libxdmcp-1.1.3  | 19 KB     | ########## | 100%
pulseaudio-14.0      | 1.7 MB    | ########## | 100%
zstd-1.5.2           | 448 KB    | ########## | 100%
libflac-1.3.4        | 474 KB    | ########## | 100%
tk-8.6.12            | 3.3 MB    | ########## | 100%
sqlite-3.39.2        | 788 KB    | ########## | 100%
xcb-util-wm-0.4.1    | 55 KB     | ########## | 100%
xorg-xextproto-7.3.0 | 28 KB     | ########## | 100%
openssl-1.1.1q       | 2.1 MB    | ########## | 100%
xorg-kbproto-1.0.7   | 27 KB     | ########## | 100%
libdb-6.2.32         | 23.3 MB   | ########## | 100%
freetype-2.12.1      | 884 KB    | ########## | 100%
liblapack-3.9.0      | 13 KB     | ########## | 100%
eigen-3.4.0          | 1.2 MB    | ########## | 100%
libidn2-2.3.3        | 155 KB    | ########## | 100%
libsndfile-1.0.31    | 602 KB    | ########## | 100%
fonts-conda-ecosyste | 4 KB      | ########## | 100%
lerc-4.0.0           | 275 KB    | ########## | 100%
libclang13-14.0.6    | 10.6 MB   | ########## | 100%
python-3.9.13        | 26.7 MB   | ########## | 100%
libopenblas-0.3.21   | 10.1 MB   | ########## | 100%
gl2ps-1.4.2          | 147 KB    | ########## | 100%
setuptools-65.0.1    | 1.4 MB    | ########## | 100%
libssh2-1.10.0       | 234 KB    | ########## | 100%
loguru-0.6.0         | 87 KB     | ########## | 100%
qt-main-5.15.4       | 61.5 MB   | ########## | 100%
utfcpp-3.2.1         | 10 KB     | ########## | 100%
libcurl-7.83.1       | 342 KB    | ########## | 100%
xorg-libx11-1.7.2    | 941 KB    | ########## | 100%
xorg-libsm-1.2.3     | 26 KB     | ########## | 100%
mysql-libs-8.0.30    | 1.9 MB    | ########## | 100%
libnsl-2.0.0         | 31 KB     | ########## | 100%
portaudio-19.6.0     | 131 KB    | ########## | 100%
hdf4-4.2.15          | 955 KB    | ########## | 100%
libcblas-3.9.0       | 13 KB     | ########## | 100%
ffmpeg-4.4.2         | 10.1 MB   | ########## | 100%
libtool-2.4.6        | 511 KB    | ########## | 100%
libxkbcommon-1.0.3   | 581 KB    | ########## | 100%
libclang-14.0.6      | 127 KB    | ########## | 100%
p11-kit-0.24.1       | 4.5 MB    | ########## | 100%
libzlib-1.2.12       | 63 KB     | ########## | 100%
libvorbis-1.3.7      | 280 KB    | ########## | 100%
keyutils-1.6.1       | 115 KB    | ########## | 100%
ca-certificates-2022 | 149 KB    | ########## | 100%
jpeg-9e              | 269 KB    | ########## | 100%
readline-8.1.2       | 291 KB    | ########## | 100%
fonts-conda-forge-1  | 4 KB      | ########## | 100%
libstdcxx-ng-12.1.0  | 4.3 MB    | ########## | 100%
glib-2.72.1          | 443 KB    | ########## | 100%
font-ttf-inconsolata | 94 KB     | ########## | 100%
xorg-xproto-7.0.31   | 73 KB     | ########## | 100%
libedit-3.1.20191231 | 121 KB    | ########## | 100%
libvpx-1.11.0        | 1.1 MB    | ########## | 100%
nettle-3.8.1         | 1.1 MB    | ########## | 100%
numpy-1.23.1         | 7.0 MB    | ########## | 100%
dbus-1.13.6          | 604 KB    | ########## | 100%
libopus-1.3.1        | 255 KB    | ########## | 100%
attr-2.5.1           | 69 KB     | ########## | 100%
libtasn1-4.18.0      | 113 KB    | ########## | 100%
xcb-util-0.4.0       | 20 KB     | ########## | 100%
libudev1-249         | 109 KB    | ########## | 100%
gstreamer-1.20.3     | 2.0 MB    | ########## | 100%
gmp-6.2.1            | 806 KB    | ########## | 100%
proj-9.0.1           | 3.1 MB    | ########## | 100%
font-ttf-dejavu-sans | 388 KB    | ########## | 100%
xcb-util-image-0.4.0 | 24 KB     | ########## | 100%
xz-5.2.6             | 409 KB    | ########## | 100%
libpq-14.5           | 3.0 MB    | ########## | 100%
xcb-util-keysyms-0.4 | 12 KB     | ########## | 100%
fontconfig-2.14.0    | 305 KB    | ########## | 100%
pugixml-1.11.4       | 125 KB    | ########## | 100%
libogg-1.3.4         | 206 KB    | ########## | 100%
gst-plugins-base-1.2 | 2.8 MB    | ########## | 100%
libtheora-1.1.1      | 651 KB    | ########## | 100%
libpciaccess-0.16    | 37 KB     | ########## | 100%
libiconv-1.16        | 1.4 MB    | ########## | 100%
icu-70.1             | 13.5 MB   | ########## | 100%
libcap-2.64          | 96 KB     | ########## | 100%
libnetcdf-4.8.1      | 1.5 MB    | ########## | 100%
alsa-lib-1.2.6.1     | 578 KB    | ########## | 100%
libxcb-1.13          | 391 KB    | ########## | 100%
xorg-libice-1.0.10   | 58 KB     | ########## | 100%
libsqlite-3.39.2     | 789 KB    | ########## | 100%
libdeflate-1.13      | 79 KB     | ########## | 100%
libgfortran5-12.1.0  | 1.8 MB    | ########## | 100%
libwebp-base-1.2.4   | 404 KB    | ########## | 100%
font-ttf-ubuntu-0.83 | 1.9 MB    | ########## | 100%
curl-7.83.1          | 89 KB     | ########## | 100%
libxml2-2.9.14       | 771 KB    | ########## | 100%
lz4-c-1.9.3          | 179 KB    | ########## | 100%
#8 199.1 Preparing transaction: ...working... done
#8 200.9 Verifying transaction: ...working... done
#8 204.6 Executing transaction: ...working... done
#8 209.8 Installing pip dependencies: ...working... Pip subprocess error:
#8 229.4   error: subprocess-exited-with-error
#8 229.4
#8 229.4   × python setup.py bdist_wheel did not run successfully.
#8 229.4   │ exit code: 1
#8 229.4   ╰─> [24 lines of output]
#8 229.4       /tmp/pip-install-0qszbztc/mayavi_2026f6382bda4de5ac2d1a6e2cb250bf/setup.py:13: DeprecationWarning:
#8 229.4
#8 229.4         `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
#8 229.4         of the deprecation of `distutils` itself. It will be removed for
#8 229.4         Python >= 3.12. For older Python versions it will remain present.
#8 229.4         It is recommended to use `setuptools < 60.0` for those Python versions.
#8 229.4         For more details, see:
#8 229.4           https://numpy.org/devdocs/reference/distutils_status_migration.html
#8 229.4
#8 229.4
#8 229.4         from numpy.distutils.command import build, install_data
#8 229.4       ********************************************************************************
#8 229.4
#8 229.4           Numpy is required to build Mayavi correctly, please install it first.
#8 229.4
#8 229.4       ********************************************************************************
#8 229.4       Traceback (most recent call last):
#8 229.4         File "<string>", line 2, in <module>
#8 229.4         File "<pip-setuptools-caller>", line 34, in <module>
#8 229.4         File "/tmp/pip-install-0qszbztc/mayavi_2026f6382bda4de5ac2d1a6e2cb250bf/setup.py", line 396, in <module>
#8 229.4           raise RuntimeError(msg)
#8 229.4       RuntimeError:
#8 229.4           Numpy is required to build Mayavi correctly, please install it first.
#8 229.4
#8 229.4       [end of output]
#8 229.4
#8 229.4   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 229.4   ERROR: Failed building wheel for mayavi
#8 229.4   error: subprocess-exited-with-error
#8 229.4
#8 229.4   × Running setup.py install for mayavi did not run successfully.
#8 229.4   │ exit code: 1
#8 229.4   ╰─> [24 lines of output]
#8 229.4       /tmp/pip-install-0qszbztc/mayavi_2026f6382bda4de5ac2d1a6e2cb250bf/setup.py:13: DeprecationWarning:
#8 229.4
#8 229.4         `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
#8 229.4         of the deprecation of `distutils` itself. It will be removed for
#8 229.4         Python >= 3.12. For older Python versions it will remain present.
#8 229.4         It is recommended to use `setuptools < 60.0` for those Python versions.
#8 229.4         For more details, see:
#8 229.4           https://numpy.org/devdocs/reference/distutils_status_migration.html
#8 229.4
#8 229.4
#8 229.4         from numpy.distutils.command import build, install_data
#8 229.4       ********************************************************************************
#8 229.4
#8 229.4           Numpy is required to build Mayavi correctly, please install it first.
#8 229.4
#8 229.4       ********************************************************************************
#8 229.4       Traceback (most recent call last):
#8 229.4         File "<string>", line 2, in <module>
#8 229.4         File "<pip-setuptools-caller>", line 34, in <module>
#8 229.4         File "/tmp/pip-install-0qszbztc/mayavi_2026f6382bda4de5ac2d1a6e2cb250bf/setup.py", line 396, in <module>
#8 229.4           raise RuntimeError(msg)
#8 229.4       RuntimeError:
#8 229.4           Numpy is required to build Mayavi correctly, please install it first.
#8 229.4
#8 229.4       [end of output]
#8 229.4
#8 229.4   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 229.4 error: legacy-install-failure
#8 229.4
#8 229.4 × Encountered error while trying to install package.
#8 229.4 ╰─> mayavi
#8 229.4
#8 229.4 note: This is an issue with the package mentioned above, not pip.
#8 229.4 hint: See above for output from the failure.
#8 229.4
#8 229.4 Ran pip subprocess with arguments:
#8 229.4 ['/opt/conda/envs/mayavitest/bin/python', '-m', 'pip', 'install', '-U', '-r', '/data/condaenv.tt3em2t9.requirements.txt']
#8 229.4 Pip subprocess output:
#8 229.4 Collecting xvfbwrapper==0.2.9
#8 229.4   Downloading xvfbwrapper-0.2.9.tar.gz (5.6 kB)
#8 229.4   Preparing metadata (setup.py): started
#8 229.4   Preparing metadata (setup.py): finished with status 'done'
#8 229.4 Collecting mayavi==4.8.0
#8 229.4   Downloading mayavi-4.8.0.tar.gz (19.8 MB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.8/19.8 MB 3.5 MB/s eta 0:00:00
#8 229.4   Preparing metadata (setup.py): started
#8 229.4   Preparing metadata (setup.py): finished with status 'done'
#8 229.4 Collecting apptools
#8 229.4   Downloading apptools-5.2.0-py3-none-any.whl (229 kB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.2/229.2 kB 2.6 MB/s eta 0:00:00
#8 229.4 Collecting envisage
#8 229.4   Downloading envisage-6.1.0-py3-none-any.whl (280 kB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.8/280.8 kB 2.5 MB/s eta 0:00:00
#8 229.4 Requirement already satisfied: numpy in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from mayavi==4.8.0->-r /data/condaenv.tt3em2t9.requirements.txt (line 2)) (1.23.1)
#8 229.4 Collecting pyface>=6.1.1
#8 229.4   Downloading pyface-7.4.2-py3-none-any.whl (1.3 MB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 2.9 MB/s eta 0:00:00
#8 229.4 Collecting pygments
#8 229.4   Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 2.5 MB/s eta 0:00:00
#8 229.4 Collecting traits>=6.0.0
#8 229.4   Downloading traits-6.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 1.6 MB/s eta 0:00:00
#8 229.4 Collecting traitsui>=7.0.0
#8 229.4   Downloading traitsui-7.4.0-py3-none-any.whl (1.5 MB)
#8 229.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 1.4 MB/s eta 0:00:00
#8 229.4 Requirement already satisfied: vtk in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from mayavi==4.8.0->-r /data/condaenv.tt3em2t9.requirements.txt (line 2)) (9.1.0)
#8 229.4 Collecting configobj
#8 229.4   Downloading configobj-5.0.6.tar.gz (33 kB)
#8 229.4   Preparing metadata (setup.py): started
#8 229.4   Preparing metadata (setup.py): finished with status 'done'
#8 229.4 Requirement already satisfied: setuptools in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from envisage->mayavi==4.8.0->-r /data/condaenv.tt3em2t9.requirements.txt (line 2)) (65.0.1)
#8 229.4 Collecting six
#8 229.4   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#8 229.4 Building wheels for collected packages: xvfbwrapper, mayavi, configobj
#8 229.4   Building wheel for xvfbwrapper (setup.py): started
#8 229.4   Building wheel for xvfbwrapper (setup.py): finished with status 'done'
#8 229.4   Created wheel for xvfbwrapper: filename=xvfbwrapper-0.2.9-py3-none-any.whl size=5009 sha256=b85de163cf4c216d0d20452b53bbdd0c2a4b88a10ca68b9a0b44a7a9077c6d84
#8 229.4   Stored in directory: /root/.cache/pip/wheels/aa/09/0e/c0fa4c721cfb0a003121597a24181add912b7488054d2311ad
#8 229.4   Building wheel for mayavi (setup.py): started
#8 229.4   Building wheel for mayavi (setup.py): finished with status 'error'
#8 229.4   Running setup.py clean for mayavi
#8 229.4   Building wheel for configobj (setup.py): started
#8 229.4   Building wheel for configobj (setup.py): finished with status 'done'
#8 229.4   Created wheel for configobj: filename=configobj-5.0.6-py3-none-any.whl size=34528 sha256=029b82f49a89df40bad12794526c6e4c5e33936f83ca080f7dd37757fba838dc
#8 229.4   Stored in directory: /root/.cache/pip/wheels/4b/35/53/dfa4d3a4196794cb0a777a97c68dcf02b073d33de9c135d72a
#8 229.4 Successfully built xvfbwrapper configobj
#8 229.4 Failed to build mayavi
#8 229.4 Installing collected packages: xvfbwrapper, traits, six, pygments, pyface, configobj, traitsui, apptools, envisage, mayavi
#8 229.4   Running setup.py install for mayavi: started
#8 229.4   Running setup.py install for mayavi: finished with status 'error'
#8 229.4
#8 229.4 failed
#8 229.4
#8 229.4 CondaEnvException: Pip failed
#8 229.4
------
executor failed running [/bin/sh -c conda env create --file=/data/conda_env_definition_min.yml]: exit code: 1
Stefan-1313 commented 1 year ago

If I build the Docker image without Mayavi (but with VTK and Numpy), it builds successfully. If I then, start the Docker container, activate the conda environment, and install Mayavi using pip install mayavi==4.8.0, I get about the same error (see below).

However, Numpy really is installed:

(mayavitest) root@1b27e323bb33:/home/developer/workspace# pip show numpy
Name: numpy
Version: 1.23.1
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: /opt/conda/envs/mayavitest/lib/python3.9/site-packages
Requires:
Required-by:

Full output when doing pip install mayavi==4.8.0:

(mayavitest) root@1b27e323bb33:/home/developer/workspace# pip install mayavi==4.8.0
Collecting mayavi==4.8.0
  Downloading mayavi-4.8.0.tar.gz (19.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.8/19.8 MB 5.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting apptools
  Downloading apptools-5.2.0-py3-none-any.whl (229 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.2/229.2 kB 5.2 MB/s eta 0:00:00
Collecting envisage
  Downloading envisage-6.1.0-py3-none-any.whl (280 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.8/280.8 kB 5.5 MB/s eta 0:00:00
Requirement already satisfied: numpy in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from mayavi==4.8.0) (1.23.1)
Collecting pyface>=6.1.1
  Downloading pyface-7.4.2-py3-none-any.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 6.3 MB/s eta 0:00:00
Collecting pygments
  Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 6.0 MB/s eta 0:00:00
Collecting traits>=6.0.0
  Downloading traits-6.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 6.1 MB/s eta 0:00:00
Collecting traitsui>=7.0.0
  Downloading traitsui-7.4.0-py3-none-any.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 5.8 MB/s eta 0:00:00
Requirement already satisfied: vtk in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from mayavi==4.8.0) (9.1.0)
Collecting configobj
  Downloading configobj-5.0.6.tar.gz (33 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools in /opt/conda/envs/mayavitest/lib/python3.9/site-packages (from envisage->mayavi==4.8.0) (65.0.1)
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: mayavi, configobj
  Building wheel for mayavi (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /tmp/pip-install-uq12jvlq/mayavi_f594e4720417418287ea51e0a075b4c7/setup.py:13: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

        from numpy.distutils.command import build, install_data
      ********************************************************************************

          Numpy is required to build Mayavi correctly, please install it first.

      ********************************************************************************
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-uq12jvlq/mayavi_f594e4720417418287ea51e0a075b4c7/setup.py", line 396, in <module>
          raise RuntimeError(msg)
      RuntimeError:
          Numpy is required to build Mayavi correctly, please install it first.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mayavi
  Running setup.py clean for mayavi
  Building wheel for configobj (setup.py) ... done
  Created wheel for configobj: filename=configobj-5.0.6-py3-none-any.whl size=34528 sha256=c699785f742b4c90bbd92bc0b19e8b65a5a4e6cb522db57068875a428ba5a129
  Stored in directory: /root/.cache/pip/wheels/4b/35/53/dfa4d3a4196794cb0a777a97c68dcf02b073d33de9c135d72a
Successfully built configobj
Failed to build mayavi
Installing collected packages: traits, six, pygments, pyface, configobj, traitsui, apptools, envisage, mayavi
  Running setup.py install for mayavi ... error
  error: subprocess-exited-with-error

  × Running setup.py install for mayavi did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /tmp/pip-install-uq12jvlq/mayavi_f594e4720417418287ea51e0a075b4c7/setup.py:13: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

        from numpy.distutils.command import build, install_data
      ********************************************************************************

          Numpy is required to build Mayavi correctly, please install it first.

      ********************************************************************************
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-uq12jvlq/mayavi_f594e4720417418287ea51e0a075b4c7/setup.py", line 396, in <module>
          raise RuntimeError(msg)
      RuntimeError:
          Numpy is required to build Mayavi correctly, please install it first.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mayavi

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Stefan-1313 commented 1 year ago

And this problem vanished again without a trace and without any change to Mayavi. Any idea why?

Sbozzolo commented 1 year ago

I am finding the same problem. I am using poetry and reduced the command to:

/home/sbozzolo/.cache/pypoetry/virtualenvs/kuibit-WOUJ0sVi-py3.10/bin/python -m pip install --use-pep517 --disable-pip-version-check --prefix /home/sbozzolo/.cache/pypoetry/virtualenvs/kuibit-WOUJ0sVi-py3.10 --no-deps /tmp/test/mayavi-4.8.0/

I can see that indeed the setup.py does not find numpy. However /home/sbozzolo/.cache/pypoetry/virtualenvs/kuibit-WOUJ0sVi-py3.10/bin/python -c "import numpy; print(numpy.__file__)" correctly works.

This is affecting my CI: https://github.com/Sbozzolo/kuibit/actions/runs/3132102346/jobs/5084107473

prabhuramachandran commented 1 year ago

This should now be fixed with the new release.