#๐Ÿ”’ Can't install opencv on macos.

19 messages ยท Page 1 of 1 (latest)

hazy folioBOT
#

@vivid void

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

vivid void
#

Whenever I try to install numpy I get the following error (full error):

            SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
            [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.

However, I've already got numpy & cython installed so I don't understand why its failing:

Olis-iMac:autoready oli$ python3
imPython 3.11.5 (v3.11.5:cce6ba91b3, Aug 24 2023, 10:50:31) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cython
>>> import numpy
>>> cython.__version__
'3.0.9'
>>> numpy.__version__
'1.26.4'
torn pilot
#

Perhaps you need to install python-dev|python-devel.

Do you have that installed?

vivid void
#

ill try uninstalling python and reinstalling it via homebrew and see if that fixes it

nimble pelican
#

@vivid void is this m1 Mac?

vivid void
nimble pelican
vivid void
#

its not installing but building the wheel is taking ages after installing homebrew

vivid void
#

but yeah its a hackintosh

nimble pelican
#

That's what I thought

vivid void
#

it now finally installed

#

it was building the wheel for opencv

nimble pelican
#

It used to take around ~15-20mins when I tried building it from the last time

vivid void
#

took i think like 40 mins pepecry

#

!close

hazy folioBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.