You need to use the proper git URL:

pip install git+https://github.com/jkbr/httpie.git#egg=httpie

Also see the VCS Support section of the pip documentation.

Don’t forget to include the egg=<projectname> part to explicitly name the project; this way pip can track metadata for it without having to have run the setup.py script.

Answer from Martijn Pieters on Stack Overflow
🌐
Reddit
https://reddit.com › r/learnpython › how do i install a python package/module from github?
r/learnpython on Reddit: How do I install a python package/module from github?
September 5, 2025 -

I want to parse isc dhcp and dns files. I found "iscpy" which was for python2. Digger further I fould an updated version for python3. I tried "pip3 install iscpy" and it puked all over an attempt to use the python2 code.

So I downloaded the ZIP file from github: https://github.com/ali-heidari/iscpy Now what do I do with it? I would like to put it where python will find it with an import. It seems I can unzip it, rename the directory and put it into my directory and it might work, but how do I make it available to other python projects on my system?

Discussions

How do I install a Python package from GitHub with extra dependencies, but without `git`? - Stack Overflow
I am looking for a one-liner to install a Python package from GitHub via pip, without having git installed necessarily, and with being able to specify extra dependencies. This is what I tried (no n... More on stackoverflow.com
🌐 stackoverflow.com
python - How to install from a downloaded git repository - Stack Overflow
I have been given a link to a github repository and informed to install using pip install rep-name unfortunately I was advised not to share the exact URL for now, so I will use rep-name. This question may be related to Install a downloaded package from GitHub but I am not using npm. More on stackoverflow.com
🌐 stackoverflow.com
How do I install a python package/module from github?
You can install directly from any Git repository. Just as an example, pip install git+https://github.com/ali-heidari/iscpy.git should work. More on reddit.com
🌐 r/learnpython
10
8
September 5, 2025
Newbie here, how does one install a module from GitHub
Install git. Clone the repo. Cd into the directory with setup.py in it and pip install . the period means "this directory". More on reddit.com
🌐 r/learnpython
14
1
February 22, 2019
🌐
GeeksforGeeks
https://geeksforgeeks.org › python › how-to-install-a-python-package-from-a-github-repository
How to install a Python Package from a GitHub Repository - GeeksforGeeks
July 23, 2025 - pip install clip@git+https://g... "project name" use #egg=<pkg_name> and add it at the end. pip install "Package" @ git+"URL of the repository#egg=<pkg_name>"...
🌐
LabEx
https://labex.io › tutorials › python-how-to-install-python-package-from-github-437144
How to install Python package from GitHub | LabEx
## Detailed installation log pip install -v git+https://github.com/username/repository.git · ## Verify installed package details pip show package_name · ## Check Python version python3 --version ## Check pip version pip --version
🌐
Fabrizio Musacchio
https://fabriziomusacchio.com › home › blog
How to install and run Python code from GitHub - Fabrizio Musacchio
April 29, 2026 - If the repository is an installable Python package, installing it directly with pip from GitHub is often the most convenient option.
🌐
GeeksforGeeks
https://geeksforgeeks.org › how-to-install-a-python-package-from-a-github-repository
How to install a Python Package from a GitHub Repository - GeeksforGeeks
December 28, 2022 - Here, you have to replace the version ... from commits and subdirectories and name the project also. pip install pip@git+https://github.com/pypa/pip@'version commit'...
🌐
PyTutorial
https://pytutorial.com › install-python-packages-from-github
PyTutorial | Install Python Packages from GitHub
May 25, 2025 - pip install https://github.com... is correct. ... Use --user to install locally or run as admin. Installing Python packages from GitHub is easy with pip....
Find elsewhere
Top answer
1 of 1
3

I know you are asking for a one-liner, but let me describe first the common workaround to targeting Git repositories (not just Github) that also avoids requiring git:

  1. Download a copy of the source code
    • Using wget or curl or whichever shell or script-able utility is available
    • From Github, you can target either
      • A .zip/.tar.gz of a specific branch or commit or tag
        For example, from mypy's Github, you can get the latest master, a specific tag v0.950, or choose any of the other release tags.
      • A .zip/.tar.gz from a release
        For example, from black's Github, from the 22.3.0 release page, get the 22.3.0 source codes
  2. Unzip/Untar the .zip/.tar.gz to some temporary directory
  3. From that temporary directory, run
    pip install ./<temp directory>[<extra dependency]
    
    • The same considerations for where pip installs the package applies
    • If using a virtual env, make sure to activate it first
    • Or use the python -m pip install ... syntax to select a specific environment and interpreter

With regular pip install targeting a Git repo like this,

pip install git+https://github.com/python/mypy.git#egg=mypy[reports]
pip install "mypy[reports] @ https://github.com/python/mypy/archive/master.zip"

...it automatically already does steps 1 and 2. If you add a -v/--verbose option, you'll see that it clones a copy of the codes first from a specific commit, and stores them in some temporary directory (which we don't normally care about), then does the regular installation from there.

Sample for mypy:

$ pip install -v git+https://github.com/python/mypy.git#egg=mypy[reports]
...
Collecting mypy[reports]
  Cloning https://github.com/python/mypy.git to /private/var/folders/3h/pdjwtnlx4p13chnw21rvwbtw0000gp/T/pip-install-d6gv_iva/mypy_fe678fe853cb45b68755c0c57dfcb757
...
Cloning into '/private/var/folders/3h/pdjwtnlx4p13chnw21rvwbtw0000gp/T/pip-install-d6gv_iva/mypy_fe678fe853cb45b68755c0c57dfcb757'
...
Building wheels for collected packages: mypy
  Running command Building wheel for mypy (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  pin_version()
  creating build
  creating build/lib
  creating build/lib/mypy
  creating build/lib/mypyc
...
Successfully built mypy
Installing collected packages: mypy
  Running command git rev-parse HEAD
  4f07c79aea0fef61ab649d6acedf01186f1054eb
  changing mode of /path/to/venv/bin/dmypy to 755
  changing mode of /path/to/venv/bin/mypy to 755
  changing mode of /path/to/venv/bin/mypyc to 755
  changing mode of /path/to/venv/bin/stubgen to 755
  changing mode of /path/to/venvi/bin/stubtest to 755
Successfully installed mypy-0.960+dev.4f07c79aea0fef61ab649d6acedf01186f1054eb

$ python
...
>>> import importlib_metadata
>>> importlib_metadata.metadata('mypy').get_all('Requires-Dist')
[ ... extra == 'reports'"]

So, if you don't have Git, you can't do a git clone, but instead have to download the codes manually. As with the direct pip install, if you don't care about a specific version, you can just download the latest master/main commit:

Sample again for mypy:

$ wget -O mypy-master.zip https://github.com/python/mypy/archive/refs/heads/master.zip
...
2022-05-05 20:29:07 (2.85 MB/s) - ‘mypy-master.zip’ saved [3433301]

$ unzip -o mypy-master.zip
...
inflating: mypy-master/test-data/unit/typexport-basic.test  
inflating: mypy-master/test-requirements.txt  
inflating: mypy-master/tox.ini 

Then the last step would simply be doing pip install, which supports targetting a <local project path> and specifying extras all in one command:

python -m pip install .[PDF]  # project in current directory

So following the downloaded and unpacked mypy-master above, the last step would simply be:

$ pip install -v ./mypy-master[reports]
Processing ./mypy-master
...
Building wheels for collected packages: mypy
  Running command Building wheel for mypy (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  pin_version()
  creating build
  creating build/lib
  creating build/lib/mypy
  creating build/lib/mypyc
...
Successfully built mypy
Installing collected packages: mypy
  Running command git rev-parse HEAD
  4f07c79aea0fef61ab649d6acedf01186f1054eb
  changing mode of /path/to/venv/bin/dmypy to 755
  changing mode of /path/to/venv/bin/mypy to 755
  changing mode of /path/to/venv/bin/mypyc to 755
  changing mode of /path/to/venv/bin/stubgen to 755
  changing mode of /path/to/venvi/bin/stubtest to 755
Successfully installed mypy-0.960+dev.4f07c79aea0fef61ab649d6acedf01186f1054eb

$ python
...
>>> import importlib_metadata
>>> importlib_metadata.metadata('mypy').get_all('Requires-Dist')
[ ... extra == 'reports'"]

...which shows the same output as the one that pip install-ed directly from git+https. The same considerations with using pip install applies, for example, if you are using a virtual environment, make sure to activate that first so mypy is installed in the same location.

Now, to make it all a one-liner command, you can turn those steps into a script, a shell alias, or just straight-up run multiple commands with && operator:

$ wget -O mypy-master.zip https://github.com/python/mypy/archive/refs/heads/master.zip && unzip -o mypy-master.zip && pip install ./mypy-master[reports] && rm -R mypy-master*

Note that I added removal of the temporary files/folders at the end of the command. If one of the steps fails (ex. network connection error), then the rest of the commands will be aborted. You can add better/more error-handling as needed.

$ wget -O mypy-master.zip https://github.com/python/mypy/archive/refs/heads/master.zip && unzip -o mypy-master.zip && pip install ./mypy-master[reports] && rm -Rf mypy-master*
--2022-05-05 21:09:39--  https://github.com/python/mypy/archive/refs/heads/master.zip
Resolving github.com (github.com)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘github.com’

I agree though that that isn't an elegant or an intuitive command.

🌐
Medium
https://medium.com › @lynzt › install-python-packages-from-github-5866d234c4e4
install python packages from github | by lindsay | Medium
June 2, 2017 - So now I have a python package ... on my virtual machine (else it won’t work and you’ll get an error). ... Then pip install from github....
🌐
Medium
https://allwin-raju.medium.com › how-to-install-python-packages-from-github-using-pip-54dd6a2f7f0f
How to Install Python Packages from GitHub Using pip | by Allwin Raju | Medium
December 11, 2024 - When working with Python, you might encounter situations where a package you need isn’t available on PyPI (Python Package Index) but is hosted on GitHub instead. Whether it’s a cutting-edge feature, a custom implementation, or a forked version of an existing library, you can easily install it using pip. Here's a complete guide to installing Python packages directly from GitHub.
🌐
Adam Johnson
https://adamj.eu › tech › 2019 › 03 › 11 › pip-install-from-a-git-repository
‘pip install’ From a Git Repository - Adam Johnson
$ python -m pip install 'django @ git+https://github.com/django/django@80d38de52bb2721a7b44fce4057bcff571afc23a' Collecting django@ git+https://github.com/django/django@80d38de52bb2721a7b44fce4057bcff571afc23a Cloning https://github.com/dja...
🌐
Stack Abuse
https://stackabuse.com › bytes › installing-python-packages-from-a-git-repo-with-pip
Installing Python Packages from a Git Repo with pip
August 28, 2023 - Installing a Python package from a Git repo branch is straightforward with pip. Here's the general syntax: $ pip install git+https://github.com/username/repo.git@branch_name
🌐
OSTechNix
https://ostechnix.com › home › package management › install python packages from github on linux
Install Python Packages From GitHub On Linux - OSTechNix
March 30, 2021 - Just in case, you don't have git installed on your Linux system, install the python package by mentioning the full path of its tarball file like below. $ pip install https://github.com/srsudar/eg/archive/v1.1.1.tar.gz
🌐
Jugmac00
https://jugmac00.github.io › today i learned › how to install a python package directly from a git branch from github
How to Install a Python Package Directly From a Git Branch From GitHub | Jürgen Gmach
January 11, 2021 - That means there is no new package on PyPI, yet. So, I had to install tox directly from GitHub, to be exact, from the rewrite branch:
🌐
GitHub
https://gist.github.com › javrasya › e95ade856ff42e4649972f8a54368459
pip-install-from-a-git-repo.md · GitHub
#For Local Git Repository pip install git+file///path/to/your/git/project/ #Example: pip install git+file:///Users/ahmetdal/workspace/celery/
🌐
<nezhar/>
https://nezhar.com › blog › install-python-packages-from-git-repository-with-pip
Install Python packages from git repository with pip | nezhar.com
August 6, 2021 - Example: pip install git+https://github.com/nezhar/django-model-prefix@a5cabf1ac210b6358ea358b1d268d802114d85d4 · Some packages provide extras_require inside setup.py or setup.cfg. In order to target them during the installation process, the #egg argument must be provided.
🌐
Datawookie
https://datawookie.dev › blog › 2024-03-10-python-packages-from-github
Python Packages from GitHub – datawookie
March 10, 2024 - Install Python packages from private GitHub repositories by swapping to HTTPS and using a token instead of SSH auth.
🌐
Medium
https://medium.com › @Mr.Nitinsoni › how-to-install-python-package-from-github-8c8c20203522
How to Install a Python Package from GitHub? | Medium
January 9, 2023 - Use pip to install the package directly from GitHub: ... This method is quick and easy, but it only installs the latest version of the package. If you want to install a specific version, you’ll need to use one of the other methods.
🌐
GitHub
https://gist.github.com › whyvez › 973ed0754a424ab44218
install python package from github · GitHub
install python package from github. GitHub Gist: instantly share code, notes, and snippets.