View previous topic :: View next topic |
Author |
Message |
Jimmy2027 n00b
Joined: 12 May 2020 Posts: 47
|
Posted: Sun Feb 28, 2021 12:00 pm Post subject: python package installed at /lib64 which is not in sys.path |
|
|
Hi, I believe that the switch to amd64 17.1 that I performed a few moths ago went bad because my package opencv is installed under lib64 which is not in my python path.
Even though I have opencv installed, python -c "import cv2" gives me "ModuleNotFoundError: No module named 'cv2'".
My profile is: default/linux/amd64/17.1/desktop/gnome/systemd
Is there any way to debug/fix this issue?
'unsymlink-lib –analyze' gives "/lib is a real directory! was the migration done already?"
I was told to perform an update with 'emerge -e @world' which I did, but weirdly now the package pandas, which was working before, now gives the error:
"ImportError: /usr/lib/python3.8/site-packages/pandas/_libs/parsers.cpython-38-x86_64-linux-gnu.so: undefined symbol: precise_xstrtod"
I don't know if this is linked in any way to the switch to amd64 17.1 |
|
Back to top |
|
|
Jimmy2027 n00b
Joined: 12 May 2020 Posts: 47
|
Posted: Tue Mar 02, 2021 2:12 pm Post subject: |
|
|
If I add /usr/lib64 to my PATHONPATH the interpreter finds cv2. Does someone know why opencv gets install under /usr/lib64 instead of /usr/lib ? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22648
|
Posted: Tue Mar 02, 2021 4:21 pm Post subject: |
|
|
I believe it should not do that under profile 17.1. If that is happening, then this may be a bug. Please post the output of emerge --info --verbose media-libs/opencv dev-lang/python ; python --version ; equery files media-libs/opencv. Also, to confirm, you have successfully rebuilt media-libs/opencv post-migration to profile 17.1, and the problem persists, correct? I think that is true based on your earlier post, but my understanding of the migration is that if that statement is false, you are likely to have this problem. |
|
Back to top |
|
|
Jimmy2027 n00b
Joined: 12 May 2020 Posts: 47
|
Posted: Tue Mar 02, 2021 4:25 pm Post subject: |
|
|
I just found out what the issue was: an old patch...
opencv works fine now after deleting the patch
Code: | diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake
index 5d0ee4a..c7d7b4d 100644
--- a/cmake/OpenCVDetectPython.cmake
+++ b/cmake/OpenCVDetectPython.cmake
@@ -186,7 +186,7 @@ if(NOT ${found})
else() #debian based assumed, install to the dist-packages.
set(_packages_path "python${_version_major_minor}/dist-packages")
endif()
- set(_packages_path "lib/${_packages_path}")
+ set(_packages_path "lib64/${_packages_path}")
elseif(CMAKE_HOST_WIN32)
get_filename_component(_path "${_executable}" PATH)
file(TO_CMAKE_PATH "${_path}" _path) |
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22648
|
Posted: Tue Mar 02, 2021 5:40 pm Post subject: |
|
|
Is that a local patch you were applying through /etc/portage/patches, or something that needs to be removed from a central repository? |
|
Back to top |
|
|
Jimmy2027 n00b
Joined: 12 May 2020 Posts: 47
|
Posted: Tue Mar 02, 2021 8:45 pm Post subject: |
|
|
no thats a local patch that I applied through /etc/portage/patches, I think it solved a bug that an earlier version of opencv had |
|
Back to top |
|
|
|