python - 在 Google Cloud AI 平台上安装 libspatialindex
问题描述
我正在尝试在 python 中导入 rtree
导入时出现此错误
OSError: Could not find libspatialindex_c library file
在线研究它说我需要在 Jupyter 中运行 !pip install libspatialindex 时安装 libspatialindex,我收到此错误
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement libspatialindex (from versions: none)
ERROR: No matching distribution found for libspatialindex
在这里研究https://libspatialindex.org/它说要安装 conda 并运行它
conda install -c conda-forge libspatialindex=1.9.3
conda 目前不在 AI 平台笔记本上。不知道怎么安装,没看到网上有关于在AI平台上安装的说明
最好的下一步是什么?谢谢
解决方案
我按照此链接中的说明,将它们粘贴到 jupyterlab 中的终端中,并将前两个代码块粘贴到终端中。然后你就可以导入 rtree https://github.com/libspatialindex/libspatialindex/wiki/1.-Getting-Started
推荐阅读
- python-3.x - 使用 pyinstaller 的可执行文件
- python-3.x - 我尝试从特定类别中的用户删除权限
- npm - 安装软件包时出现 npm 错误
- python - 除非 SECRET_KEY 在 SETTINGS.PY 中硬编码,否则 Django- 站点将无法工作
- php - PHP字符串转换
- javascript - 从类文件调用 JavaScript
- zsh - 如何为zsh中的kill命令启用制表符完成+箭头键选择?
- wso2 - WSO2 身份服务器 5.7.0 SSO 登录到 .net 应用程序,然后转到 callbackurl
- mysql - 对大型 MySQL 表进行分区以在 varchar 列上进行搜索
- python - 无法在 pycharm venv 中使用 opencv-python