# FindPython3 and shared libs

**URL:** https://discourse.cmake.org/t/findpython3-and-shared-libs/6726
**Category:** Code
**Tags:** os:linux
**Created:** [October 26, 2022, 9:37am UTC](https://discourse.cmake.org/t/findpython3-and-shared-libs/6726 "2022-10-26T09:37:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![eriols](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eriols/32/945_2.png) [@eriols](https://discourse.cmake.org/u/eriols)
#### Post date: [October 26, 2022, 9:37am UTC](https://discourse.cmake.org/t/findpython3-and-shared-libs/6726/1 "2022-10-26T09:37:30Z")

</div>

I was doing `find_package(Python3 COMPONENTS Interpreter Development)` on Ubuntu bionic machines without specifying any hints for static or shared libs, so it found the shared libs which this application requires and all was well.  
After upgrading the OS to focal it no longer found the shared libs (despite the docs saying it will search for shared first), so I had to provide the hint and then the shared libs were found and there was much rejoicing.  
So that felt a bit like a surprise to me (shared libs being there but not being found unless hinting to search for them).  
Then the second surprise is that if I provide the shared libs hint then the `Python3_Development_FOUND` variable is suddenly false (Interpreter\_FOUND still true). Why is there a suspicious connection to shared libs here? Or have I misunderstood something?  
Version is 3.21.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 26, 2022, 12:43pm UTC](https://discourse.cmake.org/t/findpython3-and-shared-libs/6726/2 "2022-10-26T12:43:51Z")

</div>

Cc: @marc.chevrier

---

<div class="post-metadata">

### Author: ![eriols](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eriols/32/945_2.png) [@eriols](https://discourse.cmake.org/u/eriols)
#### Post date: [November 24, 2022, 8:36am UTC](https://discourse.cmake.org/t/findpython3-and-shared-libs/6726/3 "2022-11-24T08:36:16Z")

</div>

Sorry for wasting your time - it turned out that the python version I ended up getting here did not have a corresponding .so file. So that’s why I all of a sudden got the static one instead. Please close this.
