Skip to content

Build process finds wrong Python when using pyenv on Mac #4036

@gussmith23

Description

@gussmith23

I'm using pyenv to configure my global Python version. Python is in my path:

> which python
/Users/gus/.pyenv/shims/python
> which python3
/Users/gus/.pyenv/shims/python3

But when I run make:

> make       
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=OFF  -S . -B build
-- The C compiler identification is AppleClang 17.0.0.17000013
-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Building Surelog version v1.84 [da9e44be7702b9932d40e66d6dcabbca5c368199]
-- Building without demo. To enable demo build use: -DWITH_DEMO=True
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Python3: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.8") found components: Interpreter
-- Python3_EXECUTABLE = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'orderedmultidict'
CMake Error at third_party/UHDM/CMakeLists.txt:47 (message):
  The "orderedmultidict" Python3 package is not installed.  To install use
  following command: "pip3 install orderedmultidict".

At first, I thought it was the missing library issue. Then I realized that it was picking up a different Python:

-- Found Python3: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.8") found components: Interpreter
-- Python3_EXECUTABLE = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions