I have trouble installing statsmodels on Apple M1. I have tried installing with a rosetta enabled terminal, and conda-forge, but still not able to get it installed.
I get a long error ending with the following:
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/umath -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/amin-asdzdh/Developer/padfoot/.venv_padfoot/include -I/Users/amin-asdzdh/.pyenv/versions/3.7.13/include/python3.7m -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o build/temp.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/alloc.o -MMD -MF build/temp.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/alloc.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
[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.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
Related
I am trying to install wordcloud.
I tried it installing through the interpreter. The error is long, but the last part of the error is:-
wordcloud/query_integral_image.c:196:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[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.
╰─> wordcloud
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
and suggestions are:-
Troubleshooting steps:-
1. Try reading PyCharm guide on troubleshooting package installation.
2. Try installing this package by running the following commands in the terminal:-
source /Users/apple/PycharmProjects/pythonProject4/venv/bin/activate pip install wordcloud
When I try installing it using the above command on the terminal, it shows error (last part of the error):-
running build_ext
creating build/temp.macosx-10.9-universal2-3.11
creating build/temp.macosx-10.9-universal2-3.11/wordcloud
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/apple/PycharmProjects /pythonProject4/venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include /python3.11 -c wordcloud/query_integral_image.c -o build/temp.macosx-10.9-universal2-3.11 /wordcloud/query_integral_image.o
wordcloud/query_integral_image.c:196:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[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.
╰─> wordcloud
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
(venv) Apples-MacBook-Air:~ apple$
How to install it ?
I know this questions was asked couple of times, but all the answers do not work for me.
I get this error when I try to install PyAudio:
Building wheels for collected packages: pyaudio
WARNING: Ignoring --global-option when building pyaudio using PEP 517
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-39
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-cpython-39
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-cpython-39
creating build/temp.macosx-10.9-x86_64-cpython-39/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/usr/local/include -I/usr/include -I/Users/myname/PycharmProjects/a/venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/_portaudiomodule.o
src/_portaudiomodule.c:31:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
From what I can tell, it's ignoring the global portaudio and looking for another one ?
I removed and installed already portaudio with brew, I update everything, I installed command line for Xcode, I tried with anaconda in notebook, same error there as well. I already tried to installed wheel and said its fulfilled.
Where to put this portaudio file so it see it ?
Any suggestions to fix this error ?
Thanks
Could anyone comment whether multiple numpy installation is the reason for the error? If it is yes, what can I do?
Please let me explain the error here. When installing a package (argoverse https://github.com/argoai/argoverse-api ), I run into the following error on Mac while I didn't run into such problem while installing it on PC (x86). Error msg as shown below.
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/src/umath -Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath -Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10
-Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o
build/temp.macosx-10.9-universal2-3.10/numpy/core/src/multiarray/alloc.o
-MMD -MF build/temp.macosx-10.9-universal2-3.10/numpy/core/src/multiarray/alloc.o.d
-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run
successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a
problem with pip.
After some research, I did
% brew doctor
and get the feedback like:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10-config
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3-config
Other info
% python --version Python 3.8.9 % pip install numpy Requirement
already satisfied: numpy in
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages
(1.23.1)
And checking on python's version
% python --version Python 3.8.9
% python3 --version Python 3.10.4
My Mac updated recently and I noticed that readline functionality was missing in Python. I tried to reinstall it and got a cryptic error, which I cannot decode. I have already uninstalled and reinstalled XCode, and am at a loss.
The installation is a simple: pip install readline
and (part of) the error is:
Beginning configuration for readline-6.2 for i386-apple-darwin20.6.0
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/private/var/folders/gv/vxf1pd9x3mxc320ld73kkjfw0000gp/T/pip-install-eih2gt76/readline_fb5900c159cc42958f966f55a49321bf/rl/readline-lib':
configure: error: C compiler cannot create executables
See `config.log' for more details.
...
5 warnings generated.
creating build/lib.macosx-10.9-x86_64-cpython-38
gcc -bundle -undefined dynamic_lookup -L/Users/david/opt/miniconda3/lib -L/Users/david/opt/miniconda3/lib build/temp.macosx-10.9-x86_64-cpython-38/Modules/3.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.macosx-10.9-x86_64-cpython-38/readline.cpython-38-darwin.so -arch i386 -arch x86_64
clang: error: no such file or directory: 'readline/libreadline.a'
clang: error: no such file or directory: 'readline/libhistory.a'
error: command '/usr/bin/gcc' failed with exit code 1
[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.
╰─> readline
The answer for me was reinstalling a package called ncurses, which had become corrupt. Hopefully this helps someone else.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.10
copying src/pyaudio.py -> build/lib.macosx-10.9-universal2-3.10
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-universal2-3.10
creating build/temp.macosx-10.9-universal2-3.10/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-universal2-3.10/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[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.
╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Hey this question was already asked : PyAudio error at the time of intallation (subprocess-exited-with-error)
You need to download the wheel (.whl) file on the website quoted in the answer (https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio).
And then, you install it using pip install filename.whl using the cmd in the directory where you downloaded the file in .whl .