简体   繁体   中英

Installing specific package versions with pip from git private repo

I'm deploying some custom packages with pip straight from my company's private git repo (and it's awesome). But what if I want to install a specific version of my package?

This question completements Specify extras_require with pip install -e .

I'm trying to install it with:

pip install git+https://github.com/user/project.git#egg=project==0.0.1[extra]

But I get a ERROR: Invalid requirement: 'project==0.0.1[extra]' message.

Thanks!

Easy enough:

pip install git+https://github.com/user/project.git@v0.0.1#egg=project[extra]

Of course, assuming version 0.0.1 exists.

If your project is in a subfolder:

pip install "git+https://github.com/user/project.git@v0.0.1#egg=project[extra]&subdirectory=my_subprojects/subproject"

From the documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM