-
Notifications
You must be signed in to change notification settings - Fork 43
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
Error when importing python packages #38
Comments
The error message you're showing starts with a warning from My guess is that while |
I checked |
Try to import the |
I tried directly
It directly shows a import error and did not find the |
Oh, interesting. Looks like some dynamic linker stuff is going wrong on Mac. I don't have a Mac to test things on though. I assume fn main() {
python! {
import ctypes;
}
} |
What's the output of |
These look related:
It looks like this is not an issue with fn main() {
pyo3::Python::acquire_gil().python().import("ctypes").unwrap();
} If that also fails, please open an issue with PyO3. |
Importing
And directly importing it from Pyo3 also casuing a problem:
It seems this might be a problem of PyO3 or my Python installation, but why the python that runs in the rust project does not behave the same way like the terminal python? They are the same python that I checked using |
Running this command, the output is like below:
|
In that case, please open an issue with the PyO3 project. If it isn't working in PyO3, there's nothing the |
The python enviroment that I use in my rust package is anaconda python, however, error happened when I was tring to import pandas and many other packages
It shows I did not install numpy so that the inline-python could not import pandas, but the numpy is absolutely installed in my python directory.But the default package like
sys
works fine, then I useimport sys
to show the import directory of the python that I use in rust, the import directory is just the same as my anaconda python, which both are the same:What could have possible caused this problem?
The text was updated successfully, but these errors were encountered: