无法升级 Google Cloud Platform App Engine 中的 numpy 版本

问题描述

我在 Google Cloud Platform App Engine 中使用 Python2.7。我使用“内置第三方库”在我的后端代码中使用了 numpy 包,并且它工作正常。问题是现在我需要这个包的更新版本来使用pandas和matplotlib,因为使用“内置第三方库”的numpy的最新版本是1.6.1,所以我评论app.yaml中的行:

    #- name: numpy
    #  version: 1.6.1

有关“内置第三方库”的文档:https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27

这就是我按照 https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27 中的步骤使用“pip install”安装 numpy 的原因。我已经安装了 1.16.6 版。

问题是当我执行“import numpy”时我收到这个错误

File "/base/data/home/apps/s~my_project/my_version/lib/numpy/__init__.py",line 140,in <module>
    from . import _distributor_init
ImportError: cannot import name _distributor_init

我曾尝试降级 numpy 的版本,但在我“导入 numpy”时收到类似的错误

有人可以帮我吗?

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)