Opened 3 years ago

Closed 3 years ago

#63086 closed defect (fixed)

py39-opencv3 @3.4.14_0: Failed to activate due to conflict with opencv

Reported by: macdeport Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: py-opencv3

Description

main.log <= py39-opencv3-3.4.14_0.darwin_14.x86_64.tbz2

Attachments (2)

main.log.tbz (11.8 KB) - added by macdeport 3 years ago.
py39-opencv3-main.log.zip (34.6 KB) - added by macdeport 3 years ago.

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by macdeport

Attachment: main.log.tbz added

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Keywords: Python 3.9 opencv removed
Owner: set to mascguy
Port: py-opencv3 added; py39-opencv3 removed
Status: newassigned
Summary: py39-opencv3 @3.4.14_0: Failed to install py39-opencv3: no destroot found at: ...py39-opencv3 @3.4.14_0: Failed to activate due to conflict with opencv

"No destroot found" is a bit of a red herring; see ProblemHotlist#nodestrootfound. The actual problem is this:

:error:activate Failed to activate py39-opencv3: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cv2/__init__.py is being used by the active opencv port.  Please deactivate this port first, or use 'port -f activate py39-opencv3' to force the activation.

Changed 3 years ago by macdeport

Attachment: py39-opencv3-main.log.zip added

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

Yes, this is a known issue. However, port opencv is obsolete, and has been replaced by opencv3.

Can you use the latter instead?

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

@jmr We can't officially obsolete opencv yet, as auto-multiple-choice still depends on it.

comment:4 in reply to:  2 Changed 3 years ago by macdeport

Replying to mascguy:

Yes, this is a known issue. However, port opencv is obsolete, and has been replaced by opencv3.

Can you use the latter instead?

Yes, I discovered the existence of OpenCV3 and its py-opencv3 binding when I updated

opencv @3.4.14_0+python38 => opencv @3.4.14_0+python39

This prompted me to install OpenCV3 to a try to substitute it for opencv. I then tried to install py39-opencv3. The failure suggested a conflict... prompting me to uninstall opencv @3.4.14_0+python39 which I then reinstalled due to the persistent failure of the py39-opencv3 installation. Moreover, I use pyautogui which in turn uses OpenCV itself but I don't know at this time if it uses or can use OpenCV3/OpenCV4. Here is the current status of OpenCV & OpenCV3 on my machine:

opencv @3.4.14_0+python39 (active)
opencv3 @3.4.14_0 (active)

What can you suggest more to me?

comment:5 Changed 3 years ago by mascguy (Christopher Nielsen)

Ah. py39-opencv3 replaces opencv +python39. So if you use the former, that should provide the OpenCV Python bindings for pyautogui.

Can you try that and let us know if it fixes the issue?

comment:6 in reply to:  5 Changed 3 years ago by macdeport

Replying to mascguy:

Ah. py39-opencv3 replaces opencv +python39. So if you use the former, that should provide the OpenCV Python bindings for pyautogui.

Can you try that and let us know if it fixes the issue?

Perhaps I was not clear enough : as I am unable to install py39-opencv3 I cannot uninstall opencv +python39 to test if pyautogui is OK with this situation... as I understand ;-)

comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)

Sorry, I wasn't very clear. First uninstall opencv via sudo port -f uninstall opencv, then install py39-opencv3.

comment:8 in reply to:  7 Changed 3 years ago by macdeport

Replying to mascguy:

Sorry, I wasn't very clear. First uninstall opencv via sudo port -f uninstall opencv, then install py39-opencv3.

Fixed: perfectly clear and I ended with opencv4 & py39-opencv4 & pyautogui working together. Thanks for your help.

comment:9 Changed 3 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

Great, glad we could help with your issue!

Note: See TracTickets for help on using tickets.