pip install not working
Opened this issue · 2 comments
I want to open by saying I appreciate how powerful this project is for an open-source visualization suite! But I have not been able to install mayavi on new machines using pip for Python3 this year. I have tried this on MacOS (MacBook Pro, MacBook Air, multiple years), Windows (several different Dell and LG machines), and Linux (CentOS). In all cases, the pip install breaks when trying to build the wheel, despite all package dependencies being satisfied.
Instead, I had to resort to installing with the git clone directions. In these directions, however, there is an erroneous reference to a requirements text file that does not exist. The setup.py script works fine, however. It would be really nice if these issues were fixed so that new users could more easily obtain this lovely software.
Second this. Trying to install pysurfer which requires mayavi and pip install mayavi
on a WSL2 (Windows 11) breaks. Sounds like it could be related to #1294 (new Numpy version).
Error stack trace:
from /tmp/pip-build-env-tzyn7a0b/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from tvtk/src/array_ext.c:223:
/tmp/pip-build-env-tzyn7a0b/overlay/lib/python3.11/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]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
tvtk/src/array_ext.c: In function ‘__Pyx_ParseOptionalKeywords’:
tvtk/src/array_ext.c:1566:21: warning: ‘PyUnicode_GET_SIZE’ is deprecated [-Wdeprecated-declarations]
1566 | if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
| ^~
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/unicodeobject.h:1042,
from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:51,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
| ^~~~~~~~~~~~~~~~~~
tvtk/src/array_ext.c:1566:21: warning: ‘PyUnicode_GET_SIZE’ is deprecated [-Wdeprecated-declarations]
1566 | if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
| ^~
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/unicodeobject.h:1042,
from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:51,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
| ^~~~~~~~~~~~~~~~~~
tvtk/src/array_ext.c:1580:25: warning: ‘PyUnicode_GET_SIZE’ is deprecated [-Wdeprecated-declarations]
1580 | if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
| ^~
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/unicodeobject.h:1042,
from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:51,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
| ^~~~~~~~~~~~~~~~~~
tvtk/src/array_ext.c:1580:25: warning: ‘PyUnicode_GET_SIZE’ is deprecated [-Wdeprecated-declarations]
1580 | if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
| ^~
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/unicodeobject.h:1042,
from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:51,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
| ^~~~~~~~~~~~~~~~~~
tvtk/src/array_ext.c: In function ‘__Pyx_AddTraceback’:
tvtk/src/array_ext.c:2329:9: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
2329 | __pyx_lineno, /*int firstlineno,*/
| ^~~~~~~~~~~~
| |
| int
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:71,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/code.h:148:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
| ^~~~~~~~~~
tvtk/src/array_ext.c:2330:9: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
2330 | __pyx_empty_bytes /*PyObject *lnotab*/
| ^~~~~~~~~~~~~~~~~
| |
| PyObject * {aka struct _object *}
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:71,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/code.h:148:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
| ^~~~~~~~~~
tvtk/src/array_ext.c:2313:15: error: too few arguments to function ‘PyCode_New’
2313 | py_code = PyCode_New(
| ^~~~~~~~~~
In file included from /home/kriarm/miniconda3/envs/core/include/python3.11/Python.h:71,
from tvtk/src/array_ext.c:4:
/home/kriarm/miniconda3/envs/core/include/python3.11/cpython/code.h:148:28: note: declared here
148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
| ^~~~~~~~~~
tvtk/src/array_ext.c:2340:13: error: dereferencing pointer to incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2340 | py_frame->f_lineno = __pyx_lineno;
| ^~
error: Command "gcc -pthread -B /home/kriarm/miniconda3/envs/core/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/kriarm/miniconda3/envs/core/include -fPIC -O2 -isystem /home/kriarm/miniconda3/envs/core/include -fPIC -I/tmp/pip-build-env-tzyn7a0b/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.11/numpy/distutils/include -I/home/kriarm/miniconda3/envs/core/include/python3.11 -c tvtk/src/array_ext.c -o build/temp.linux-x86_64-cpython-311/tvtk/src/array_ext.o -MMD -MF build/temp.linux-x86_64-cpython-311/tvtk/src/array_ext.o.d -msse -msse2 -msse3" failed with exit status 1
INFO:
########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: x64
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : SSE SSE2 SSE3
Flags : -msse -msse2 -msse3
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
Generated : none
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /tmp/pip-install-57bovuk_/mayavi_c894ea61ccff40db95adad78e55d2414/build/temp.linux-x86_64-cpython-311/ccompiler_opt_cache_ext.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mayavi
Failed to build mayavi
ERROR: Could not build wheels for mayavi, which is required to install pyproject.toml-based projects
Can you try 4.8.2 and also master
?