Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed import on Mac, PyMUTEX_LOCK(gil->mutex) error #81

Closed
chepizhko87 opened this issue Jan 20, 2023 · 3 comments
Closed

Failed import on Mac, PyMUTEX_LOCK(gil->mutex) error #81

chepizhko87 opened this issue Jan 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@chepizhko87
Copy link

Description
Importing fastddm in python results in the following error message

Python 3.8.3 (default, Jul  2 2020, 11:26:31) 
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fastddm as fddm
Fatal Python error: PyMUTEX_LOCK(gil->mutex) failed
Python runtime state: unknown

[1]    7116 abort      python3

To Reproduce
Steps to reproduce the behavior:

  1. Install fastddm with ENABLE_CPP=ON environment variable set in a conda environment.
  2. Import fastddm in python

Expected behavior
Import successful.

Desktop (please complete the following information):

  • OS: macOS Big Sur
  • Version 11.7
  • python 3.8.3, compiled with Clang 10.0.0, Anaconda
@chepizhko87 chepizhko87 added the bug Something isn't working label Jan 20, 2023
@enrico-lattuada enrico-lattuada self-assigned this Jan 20, 2023
@enrico-lattuada enrico-lattuada added this to the v0.1.1 milestone Jan 20, 2023
@enrico-lattuada
Copy link
Collaborator

See also this issue in pybind11.
It is possibly due to hard linking of python on mac, which results in error when using anaconda.
The proposed solution is to remove the ${PYTHON_LIBRARIES} in the CMake target_link_libraries command.

@enrico-lattuada
Copy link
Collaborator

With @chepizhko87 we tested the solution on mac and linux, with and without active conda environments.
The solution should be checked also on Windows.

@enrico-lattuada
Copy link
Collaborator

6119439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants