Closed Stefan-1313 closed 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.
And this problem vanished again without a trace and without any change to Mayavi. Any idea why?
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
This should now be fixed with the new release.
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:
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
):And this conda requirements file (
conda_requirements_min.yml
):I use this command to build the Docker image:
The full
docker build
output is: