Pip installing a whl-file from a private github repository

Question:

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?

Asked By: Jacques Joubert

||

Answers:

You should be able to do

pip install https://{token}@raw.githubusercontent.com/{user}/{repo}/master/{name.whl}
Answered By: Bertik23

you should add the option -e to indicate that you are using a url :

pip install -e git+https://{token}@github.com/{org_name}/{repo_name}/blob/master/{name.whl}
Answered By: med benzekri
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.