I use my python and pip in the pyenv environment, but when I try to install numpy using pip:
pip install numpy
I got the following error, does anyone know where do I get wrong?
Collecting numpy Using cached numpy-1.21.0.zip (10.3 MB)
Installing build dependencies ... done Getting requirements to build wheel ... done ERROR: Exception: Traceback (most recent call last):
File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 188, in _main status = self.run(options, args) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper return func(self, options, args) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 333, in run reqs, check_supported_wheels=not options.target_dir File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement(req) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 488, in prepare_linked_requirement req, self.req_tracker, self.finder, self.build_isolation, File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution abstract_dist.prepare_distribution_metadata(finder, build_isolation) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata self._setup_isolation(finder) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 96, in _setup_isolation reqs = backend.get_requires_for_build_wheel() File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 161, in get_requires_for_build_wheel 'config_settings': config_settings File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 265, in _call_hook raise BackendUnavailable(data.get('traceback', '')) pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last): File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 86, in _build_backend obj = import_module(mod_path) File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 953, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/private/var/folders/nk/t9xyqhd94zzd6br4x5rg_jj80000gn/T/pip-build-env-9l_6shz6/overlay/lib/python3.7/site-packages/setuptools/init.py", line 23, in from setuptools.dist import Distribution File "/private/var/folders/nk/t9xyqhd94zzd6br4x5rg_jj80000gn/T/pip-build-env-9l_6shz6/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 34, in from setuptools import windows_support File "/private/var/folders/nk/t9xyqhd94zzd6br4x5rg_jj80000gn/T/pip-build-env-9l_6shz6/overlay/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in import ctypes File "/Users/xxx/.pyenv/versions/3.7.11/lib/python3.7/ctypes/init.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes'