Je ne suis actuellement pas en mesure d'utiliser la fonction d'intégration Cython. Le binaire compile bien et otool -L embedded
renvoie les résultats suivants.Intégration python sur Mac ModuleNotFoundError: aucun module nommé 'encodings'
embedded:
@rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1349.8.0)
Ceci est la commande que j'ai exécutée. Des pensées sur pourquoi cela ne fonctionne pas? Cython en utilisant setup.py fonctionne correctement lorsque je veux créer un module Cython, c'est-à-dire que je suis capable d'importer le module Cython en Python.
$ make
gcc -c embedded.c -I/Users/$USER/miniconda3/include/python3.6m -I/Users/$USER/miniconda3/include/python3.6m
gcc -o embedded embedded.o -L/Users/$USER/miniconda3/lib -L/Users/$USER/miniconda3/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation
$ ./embedded
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000000010f8113c0 (most recent call first):
[1] 32931 abort ./embedded
Suggestions?