【问题标题】:pip install -e . gives error 13 in conda environment点安装-e。在 conda 环境中给出错误 13
【发布时间】:2019-07-10 14:26:23
【问题描述】:

在使用 miniconda3 在 conda 环境中的 wsl 上的 Ubuntu 上安装 sunpy 的开发分支时,根据他们的 docs $ pip install -e . 的最后一个命令以 error 13: permission denied 终止。

所有的 miniconda 文件都归我的用户所有。

整个错误是:

获取文件:///mnt/h/Documents/Projects/sunpy-git 安装 构建依赖项...完成获取构建轮子的要求... 完毕 正在准备车轮元数据...错误 命令 /home/akram/miniconda3/envs/sunpy-dev/bin/python 的完整输出 /home/akram/miniconda3/envs/sunpy-dev/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpw4nipzaf: 运行 dist_info 写作/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/PKG-INFO 将dependency_links写入/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/dependency_links.txt 将入口点写入 /mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/entry_points.txt 将要求写入 /mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/requires.txt 将顶级名称写入 /mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/top_level.txt 读取清单文件'/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/SOURCES.txt' 阅读清单模板'MANIFEST.in' 编写清单文件'/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info/SOURCES.txt' 创建'/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.dist-info' 错误:[('/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.egg-info', '/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.dist-info', “[Errno 13] 权限被拒绝: '/mnt/h/Documents/Projects/sunpy-git/pip-wheel-metadata/sunpy.dist-info'")]

---------------------------------------- Command "/home/akram/miniconda3/envs/sunpy-dev/bin/python

/home/akram/miniconda3/envs/sunpy-dev/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpw4nipzaf”失败并出现错误 /mnt/h/Documents/Projects/sunpy-git 中的代码 1

但是从 Windows 的 Anaconda 提示符运行代码不会给出错误。

请注意,所有其他错误:13 个帖子建议都没有帮助。即使卸载并重新安装 miniconda 也无济于事。

【问题讨论】:

  • 您是否尝试过使用sudo 或在使用pip 时添加--user 标志?
  • 验证/mnt/h 没有以只读方式挂载(在mount 的输出中必须是rw)。验证您在/mnt/h 下的任何地方都有写权限。
  • @Carlos 是的,我已经尝试使用 sudo--user 标志,但结果是一样的。
  • @phd mount 的每个输出都是 rw 并且我在 /mnt/h 下的任何地方都有权限。
  • 您能否确认您拥有对该驱动器的完全访问权限?请查看此链接以供参考:winaero.com/blog/…

标签: python ubuntu pip conda windows-subsystem-for-linux


【解决方案1】:

我解决了这个问题。它似乎与 wsl 的权限及其在 NTFS 上修改文件的能力有关。从post 阅读 Bash on python 下的第二部分后得出了这个结论。解决方案是通过右键单击其图标并执行与上述相同的命令,以管理员权限打开终端(命令提示符或 cmder 或 hyper 或任何终端)。

顺便感谢@Carlos 和@phd 的快速回复。

【讨论】:

    猜你喜欢
    • 2019-05-04
    • 2020-11-02
    • 1970-01-01
    • 2021-08-19
    • 2016-07-07
    • 2021-11-02
    • 2022-01-02
    • 2019-01-04
    • 2021-06-22
    相关资源
    最近更新 更多