Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
python package installed at /lib64 which is not in sys.path
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 47

PostPosted: Sun Feb 28, 2021 12:00 pm    Post subject: python package installed at /lib64 which is not in sys.path Reply with quote

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
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 47

PostPosted: Tue Mar 02, 2021 2:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22642

PostPosted: Tue Mar 02, 2021 4:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 47

PostPosted: Tue Mar 02, 2021 4:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22642

PostPosted: Tue Mar 02, 2021 5:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jimmy2027
n00b
n00b


Joined: 12 May 2020
Posts: 47

PostPosted: Tue Mar 02, 2021 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum