尽管安装在venv中,仍未找到google-cloud-storage发行版

时间:2017-11-03 21:56:20

标签: google-cloud-platform google-cloud-storage google-cloud-python

与标题一样,在运行appserver时,我得到google-cloud-storage的DistributionNotFound异常:

  

文件" / home / [me] / Desktop / apollo / lib / pkg_resources / init .py",第867行,已解决       提升DistributionNotFound(req,requirers)   DistributionNotFound:' google-cloud-storage'未找到分发并且是应用程序要求

运行pip show google-cloud-storage发现它很好,在我的venv的网站包目录中。似乎所有事情都与python -c "import sys; print('\n'.join(sys.path))"一致;如果重要的话,云SDK目录也在那里。

不确定接下来该做什么。

2 个答案:

答案 0 :(得分:0)

我的解决方案是 google-cloud-storagepkg_resources 需要在同一目录中。

听起来您的 google-cloud-storage 在 venv 中,而您的 pkg_resourceslib 文件夹中

答案 1 :(得分:0)

您可以尝试使用 --user 标志将 google-cloud-storage 安装到用户站点。

  pip install google-cloud-storage --user
相关问题