安装 python 个没有依赖项的包

Installing python packages without dependencies

我正在尝试将特定版本的 python 软件包安装到预安装的 python 环境中。该软件包 laspy and the version is an old one (1.2.5). The package is supposed to work with Python version 2.7, but I am trying to install it against version 3.5, as I saw here 应该可以在 Python 3.4.

上运行

我这样做的真正原因是这个特定的 Python 是随 ArcGIS Pro 一起提供的,我需要 arcpy 模块,它只存在于这个安装中。

我已经能够使用 pip download 下载 laspy 软件包。此模块依赖于 numpy 模块,该模块已存在于 Python 环境中。这导致 pip install 失败并出现错误:

PermissionError: [WinError 5] Accesso negato: 'C:\Program Files\ArcGIS\Pro\bin\Python\Lib\site-packages\numpy'

我有点理解(它不能覆盖已经安装的numpy)。

这是我的一个大疑问:安装 laspypip--no-dependencies 选项 "break" 我的 python 安装吗?

太蠢了...错误消息PermissionError只是因为我在没有管理权限的情况下打开了cmd...

刚刚安装 laspypip install laspy==1.2.5。希望它能与 ArcGIS Pro 随附的 Python 的 64 位版本一起使用(我实际上是在 ArcGIS 10.x 随附的 python 2.7 中使用它,但它是 32 位的,并且使用 LAS 文件很容易接收 "out of memory" 消息...)。

将编辑此答案以提供有关兼容性的一些消息。

更新

好像我只能导入 laspy,但它的所有其他子模块都不起作用...

例如import laspy 有效 'from laspy.File import file' 抛出 No module named 'laspy.File'.

我现在正在切换到一个叉子(this one),希望它应该兼容。