Reputation: 1
I have tried installing but I get the following error
PS C:\Users\Georgina Zeron> pip install numpy
Collecting numpy
Using cached numpy-1.25.2.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
Traceback (most recent call last):
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-build-env-9flerb5q\overlay\lib\python3.9\site-packages\setuptools\__init__.py", line 242, in <module>
monkey.patch_all()
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-build-env-9flerb5q\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-build-env-9flerb5q\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-build-env-9flerb5q\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-build-env-9flerb5q\overlay\lib\python3.9\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
e above for details.
I have tried with numpy==1.18 and I get to the requirements but the following happens
PS C:\Users\Georgina Zeron> pip install numpy==1.18 --no-build-isolation Collecting numpy==1.18 Using cached numpy-1.18.0.zip (5.4 MB) Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [41 lines of output] Running from numpy source directory. :425: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates Processing numpy/random_bounded_integers.pxd.in Processing numpy/random\mtrand.pyx Traceback (most recent call last): File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 61, in process_pyx from Cython.Compiler.Version import version as cython_version ModuleNotFoundError: No module named 'Cython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 238, in <module>
main()
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 234, in main
find_process_files(root_dir)
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 225, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 191, in process
processor_function(fromfile, tofile)
File "C:\Users\Georgina Zeron\AppData\Local\Temp\pip-install-4lizvqul\numpy_0505c99be39549bbaed18726861293cb\tools\cythonize.py", line 66, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Cythonizing sources
Traceback (most recent call last):
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools\build_meta.py", line 380, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools\build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 450, in <module>
File "<string>", line 433, in setup_package
File "<string>", line 240, in generate_cython
RuntimeError: Running cythonize failed!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: Se
Upvotes: 0
Views: 3877
Reputation: 359
Hope you are doing ok! To be fair there could be a lot of reasons behind this error. I can suggest you first update the next packages and then install numpy:
# no cache is necessary flag so it won't use the local copy of the package that could be corrupted
pip install -U setuptools --no-cache-dir
pip install -U wheel --no-cache-dir
pip install -U numpy --no-cache-dir
Also from my experience, I suggest you not use a global environment but rather use some virtual environment. It could be standard venv
or poetry
or conda
or mamba
etc, then all packages will be isolated which is good.
Upvotes: 1