Skip to content

Error when importing python packages #38

Closed
@PosoSAgapo

Description

@PosoSAgapo

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

/opt/anaconda3/lib/python3.7/site-packages/numpy/__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "src/main.rs", line 5, in <module>
    import pandas
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/__init__.py", line 17, in <module>
    "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy: 

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 use import 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:

sys.path
['', '/opt/anaconda3/lib/python37.zip', '/opt/anaconda3/lib/python3.7', '/opt/anaconda3/lib/python3.7/lib-dynload', '/opt/anaconda3/lib/python3.7/site-packages', '/opt/anaconda3/lib/python3.7/site-packages/aeosa']

What could have possible caused this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions