Install Python Package From Private Bitbucket Repo

瘦欲@ 提交于 2019-12-20 09:18:08

问题


I created a Python 3.5 package for work, which is in a private Bitbucket repo and I can easily pull the code and do a "python .\setup.py install" to have it install, but I want to try to eliminate the step of having to pull the code and have multiple copies on my machine and at the same time make it easier for my coworkers to install/update the package. Is it possible to use git bash or cmd (we are all on Windows) to install the package and ask for credentials in the process?


回答1:


You can use the https option listed in pip_install. https://pip.pypa.io/en/stable/reference/pip_install/#git

Sample Code:

pip install git+https://USER_NAME@GIT_URL/PATH_TO_YOUR_REPO.git

You can use the url Bitbucket gives you when you request the clone url. Just remember to add the git+ to it.



来源:https://stackoverflow.com/questions/38335377/install-python-package-from-private-bitbucket-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!