python - git 克隆 + 在 Python 中安装

标签 python git pip

是否有一个单行快捷方式:

git clone https://github.com/user/mypythonmodule.git
cd mypythonmodule
python setup.py install
cd ..

喜欢

git clone install https://github.com/user/mypythonmodule.git

或者这不存在?

最佳答案

如果您使用 pip,它支持从 git URL 安装。

来自pip documentation

“pip 目前支持通过 git、git+https 和 git+ssh 进行克隆”

所以你会这样做

pip install git+https://github.com/user/mypythonmodule.git

关于python - git 克隆 + 在 Python 中安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30368435/

相关文章:

python - If 语句 - 这是一个字符串吗?

python - 将 numpy 数组与例如交互时如何设置迭代深度下一个?

git - 使用 Maven/Jenkins/Git 创建发布标签

git - ! [rejected] master -> master(先获取)

python - 为什么我会收到 ElementClickInterceptedException 错误?

用于 Web 浏览器的 Python URL 处理程序

Git - merge 到未更新的分支

python - 如何在windows下用pip+mingw安装PIL?

python - pip install rasterio 时遇到错误

python - 使用来自私有(private)存储库的requirements.txt进行Pip安装,提示输入密码