Skip to content

Numpy Installation error(MaOs) #173

@grnder

Description

@grnder

Hello, recently I was trying to install the numpy library to my MacBook from the isntallation guide in stack overflow (https://www.geeksforgeeks.org/how-to-install-numpy-on-macos/ ) and a had an issue
The first two steps worked out very well but on the third one had an error with my cyhton
Here is my terminal:

User-Air numpy-1.21.2 % python3 setup.py install
/Users/user/numpy-1.21.2/setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install
with pip instead of using setup.py install:

  • pip install . (from a git repo or downloaded source
    release)
  • pip install numpy (last NumPy release on PyPi)

Cythonizing sources
numpy/random/_bounded_integers.pxd.in has not changed
Processing numpy/random/_philox.pyx
Traceback (most recent call last):
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 59, in process_pyx
import Cython
ModuleNotFoundError: No module named 'Cython'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 240, in
main()
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 236, in main
find_process_files(root_dir)
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 227, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 193, in process
processor_function(fromfile, tofile)
File "/Users/user/numpy-1.21.2/tools/cythonize.py", line 66, in process_pyx
raise OSError(msg) from e
OSError: Cython needs to be installed in Python as a module
Traceback (most recent call last):
File "/Users/user/numpy-1.21.2/setup.py", line 448, in
setup_package()
File "/Users/user/numpy-1.21.2/setup.py", line 430, in setup_package
generate_cython()
File "/Users/user/numpy-1.21.2/setup.py", line 236, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions