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

Support Importing External Libraries #85

Closed
daytonjallen opened this issue Feb 9, 2022 · 3 comments
Closed

Support Importing External Libraries #85

daytonjallen opened this issue Feb 9, 2022 · 3 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@daytonjallen
Copy link
Contributor

It is possible that external libraries interpret the compiled python program as the location of the python executable instead of the actual path of the system's installed Python executable.

<module 'sympy' from '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sympy/__init__.py'>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/__init__.py", line 23, in <module>
    from . import multiarray
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/multiarray.py", line 10, in <module>
    from . import overrides
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/overrides.py", line 6, in <module>
    from numpy.core._multiarray_umath import (
ImportError: PyCapsule_Import could not import module "datetime"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/__init__.py", line 144, in <module>
    from . import core
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/__init__.py", line 49, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.10 from ".../Flyable/build/macos-arm64/a.out"
  * The NumPy version is: "1.22.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: PyCapsule_Import could not import module "datetime"

Application ended with code 0
@daytonjallen daytonjallen added the bug Something isn't working label Feb 9, 2022
@ALavallee
Copy link
Contributor

To test

@ALavallee
Copy link
Contributor

Because the hybrid version build doesn't match the build of some libraries, libraries like Numpy crashes.

@ALavallee
Copy link
Contributor

There is nothing to do expect match the Flyable version of Cpython with the one used to execute it.

@ALavallee ALavallee added the invalid This doesn't seem right label Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
Status: Done
Development

No branches or pull requests

2 participants