-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
MWE for path error when using libpython310 on macOS #28
base: main
Are you sure you want to change the base?
Conversation
Minimum version for C++17 support
CPPFLAGS is just the preprocessor flags anyway
…nda-forge-pinning 2023.08.15.14.20.10
Also, addition of yaml2ck
…nda-forge-pinning 2023.08.17.00.09.34
Otherwise, we have a conflict between 'cantera.lib' as the static library versus as the "import library" for 'cantera.dll'.
…nda-forge-pinning 2023.08.19.12.38.33
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
6b2962c
to
d9a9b4d
Compare
d9a9b4d
to
b9461d0
Compare
@speth was this resolved upstream? |
Not to my knowledge. The issue I created (conda-forge/conda-forge.github.io#1996) is still open and got no response. I'm not sure how to update/re-run this to test it again. |
I asked around if there was someone who could help out with that issue. Let's see if it gets a response |
This is a MWE for an issue building a package that uses an embedded Python interpreter by linking to
libpython3.10.dylib
and starting the interpreter from the Python C API. The problem is that in the embedded interpreter,sys.path
refers to paths in the base conda environment, rather than the active conda environment corresponding to thelibpython3.10.dylib
that is linked. This then makes it impossible to import packages that are installed (only) in the active conda environment.Examining
sys.path
Relevant files:
This example builds the following C++ program:
with the compiler command:
This shows that the embedded interpreter's
sys.path
is (incorrectly) defined as:While the
python
binary in this environment reportssys.path
as:(where the instances of
$PREFIX
are output substitutions introduced by Azure Pipelines).Specific conditions required to trigger behavior
This error occurs when:
Other versions of Python (3.8, 3.9, and 3.11) all work fine, as do all builds for Linux and Windows. I have also successfully built a minimal embedded Python test using the conda-forge build of Python 3.10 for macOS x64 outside of the conda-forge feedstock infrastructure (see repository and CI results here).