pip install a local git repository

后端 未结 3 1119
忘了有多久
忘了有多久 2021-01-30 02:59

I can\'t find the correct way to install a local directory as a python package using pip.

(venv) C:\\(...)>pip install . --no-index
Ignoring indexes: http://p         


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-30 03:47

    If you're working in a venv, you can do this:

    env/bin/pip install git+file:///path/to/your/git/repo
    

    Or with a branch:

    env/bin/pip install git+file:///path/to/your/git/repo@mybranch
    

提交回复
热议问题