How can one install a .whl (python library) from a private github repo?
I have setup a personal access token and can install the library if its not a .whl by using the following command
JavaScript
x
2
1
pip install git+https://{token}@github.com/{org_name}/{repo_name}.git
2
However if there is a .whl in the repo and I want to install from that using:
JavaScript
1
3
1
pip install git+https://{token}@github.com/{org_name}/{repo_name}/blob/master/{name.whl}
2
3
Then I get the following error:
JavaScript
1
2
1
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
2
I am stumped! You can pip install {name.whl} if the file is locally but not from the private github repo.
Quesiton: How to pip install name.whl on a private github repo?
Advertisement
Answer
You should be able to do
JavaScript
1
2
1
pip install https://{token}@raw.githubusercontent.com/{user}/{repo}/master/{name.whl}
2