开发者社区 > 云原生 > 正文

我是用终端直接pip install pandas -t .的,看了一下目录

我是用终端直接pip install pandas -t .的,看了一下目录, 提问9.png

会有下面这个报错,是不是版本的问题? { "ErrorCode": "CAExited", "ErrorMessage": "Function instance exited unexpected(code 1, message:operation not permitted) with start command 'python app.py '.\nLogs:Traceback (most recent call last):\r\n File "/code/app.py", line 2, in \r\n import pandas as pd\r\n File "/code/pandas/ init.py", line 16, in \r\n raise ImportError(\r\nImportError: Unable to import required dependencies:\r\nnumpy: \r\n\r\nIMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\r\n\r\nImporting the numpy C-extensions failed. This error can happen for\r\nmany reasons, often due to issues with your setup or how NumPy was\r\ninstalled.\r\n\r\nWe have compiled some common reasons and troubleshooting tips at:\r\n\r\n https://numpy.org/devdocs/user/troubleshooting-importerror.html\r\n\r\nPlease note and check the following:\r\n\r\n * The Python version is: Python3.10 from "/opt/python3.10/bin/python"\r\n * The NumPy version is: "1.21.6"\r\n\r\nand make sure that they are the versions you expect.\r\nPlease carefully study the documentation linked above for further help.\r\n\r\nOriginal error was: No module named 'numpy.core._multiarray_umath'" }

展开
收起
云上静思 2022-09-13 16:50:07 448 0
1 条回答
写回答
取消 提交回答
  • pandas,numpy貌似有不可跨平台的模块。

    可以考虑用serverless devs工具进行依赖安装--use-docker,或者自己构建函数计算的环境 参考这个: https://docs.serverless-devs.com/fc/command/build#%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C-use-docker

    大概率是这个原因 回答4.png

    此答案来自钉钉群“阿里函数计算官网"

    2022-09-13 18:16:59
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多