【问题标题】:Trying to install github package with pip using git-bash尝试使用 git-bash 使用 pip 安装 github 包
【发布时间】:2015-02-15 12:02:56
【问题描述】:

我正在尝试安装:https://github.com/dgrtwo/ParsePy。根据您需要运行的方向:

pip install git+https://github.com/dgrtwo/ParsePy.git

我正在尝试在 win7 中使用 git-bash 执行此操作。我试过了:

$ C:\\envs\\r1\\Scripts\\pip.exe install git+https://github.com/dgrtwo/ParsePy.git
Fatal error in launcher: Unable to create process using '"C:\envs\r2\Scripts\python.exe" "C:\envs\r1\Scripts\pip.exe" install git+https://github.com/dgrtwo/ParsePy.git'
(r2)
$ C:\\envs\\r1\\Scripts\\pip.exe "install git+https://github.com/dgrtwo/ParsePy.git"
Fatal error in launcher: Unable to create process using '"C:\envs\r2\Scripts\python.exe" "C:\envs\r1\Scripts\pip.exe" "install git+https://github.com/dgrtwo/ParsePy.git"'

我怎样才能安装包?

编辑:

(r2)
$ C:\\envs\\r1\\Scripts\\pip.exe install https://github.com/dgrtwo/ParsePy/archive/master.zip
Fatal error in launcher: Unable to create process using '"C:\envs\r2\Scripts\python.exe" "C:\envs\r1\Scripts\pip.exe" install https://github.com/dgrtwo/ParsePy/archive/master.zip'
(r2)
$ pip install https://github.com/dgrtwo/ParsePy/archive/master.zip
sh: pip: command not found

【问题讨论】:

    标签: python windows git-bash


    【解决方案1】:

    从Github页面复制Download ZIP的链接并交给pip:

    pip install https://github.com/dgrtwo/ParsePy/archive/master.zip
    

    它应该可以工作。

    【讨论】:

    • 由于我不是 Windows 用户,但我可以建议您使用 pip 命令的完整路径,就像您在第一次尝试使用 git 时所做的那样。
    • 试试这个C:\\envs\\r1\\Scripts\\pip.exe install https://github.com/dgrtwo/ParsePy/archive/master.zip
    • $ pip install "github.com/dgrtwo/ParsePy/archive/master.zip" 安装成功没有错误
    猜你喜欢
    • 2014-01-27
    • 2019-08-20
    • 1970-01-01
    • 1970-01-01
    • 2020-07-29
    • 1970-01-01
    • 1970-01-01
    • 2018-06-27
    • 2014-08-01
    相关资源
    最近更新 更多