Skip to content
Advertisement

Pip install a whl on a private github repo?

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

pip install git+https://{token}@github.com/{org_name}/{repo_name}.git

However if there is a .whl in the repo and I want to install from that using:

pip install git+https://{token}@github.com/{org_name}/{repo_name}/blob/master/{name.whl}

Then I get the following error:

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

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

pip install https://{token}@raw.githubusercontent.com/{user}/{repo}/master/{name.whl}
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement