You need to use the proper git URL:

Use with AIpip 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
🌐
GitHub
gist.github.com › MichaelCurrin › 57caae30bd7b0991098e9804a9494c23
How to install Python 3 · GitHub
Save MichaelCurrin/57caae30bd7b0991098e9804a9494c23 to your computer and use it in GitHub Desktop. ... Debian/Ubuntu (for other Linux distros, see this Gist). Install using apt-get. $ sudo apt-get update $ sudo apt-get install python3 # OR python3.12
People also ask

How do I pip install a Python package from a specific GitHub branch?
Append @branch-name to the repository URL inside the git+https URL, for example pip install "mypkg @ git+https://github.com/org/repo.git@develop", or use the legacy form pip install git+https://github.com/org/repo.git@develop#egg=mypkg.
🌐
golinuxcloud.com
golinuxcloud.com › home › programming › python › install a python package from github with pip: branches, tags, ssh, and requirements.txt
Install Python Package from Github [Linux and Windows]
How do I install a private GitHub repository with pip?
Use a personal access token in an HTTPS URL, or prefer SSH with a URL like git+ssh://git@github.com/org/repo.git and keys loaded in your agent; avoid committing tokens into requirements files.
🌐
golinuxcloud.com
golinuxcloud.com › home › programming › python › install a python package from github with pip: branches, tags, ssh, and requirements.txt
Install Python Package from Github [Linux and Windows]
How do I put a GitHub dependency in requirements.txt?
Add one PEP 508 line per dependency such as mypkg @ git+https://github.com/org/repo.git@main or the equivalent legacy git+ line that pip documents for your pip version.
🌐
golinuxcloud.com
golinuxcloud.com › home › programming › python › install a python package from github with pip: branches, tags, ssh, and requirements.txt
Install Python Package from Github [Linux and Windows]
🌐
Fabrizio Musacchio
fabriziomusacchio.com › home › blog
How to install and run Python code from GitHub - Fabrizio Musacchio
April 29, 2026 - If this is the case, the package can often be installed directly from GitHub with pip, even if it is not available on PyPI or conda-forge. ... This installs the package into the currently active Python environment.
🌐
GitHub
github.com › python › cpython
GitHub - python/cpython: The Python programming language · GitHub
October 12, 2026 - Building a complete Python installation requires the use of various additional third-party libraries, depending on your build platform and configure options. Not all standard library modules are buildable or usable on all platforms.
🌐
GitHub
github.com › pypa › pip
GitHub - pypa/pip: The Python package installer · GitHub
You can use pip to install packages from the Python Package Index and other indexes. Please take a look at our documentation for how to install and use pip: ... We release updates regularly, with a new version every 3 months. Find more details in our documentation: ... If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms: ... If you want to get involved, head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:
🌐
LabEx
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
Find elsewhere
🌐
GitHub
github.com › PackeTsar › Install-Python
GitHub - PackeTsar/Install-Python: Quick Guide for Installing Python on Common Operating Systems · GitHub
Walk through the below steps to install Homebrew and an updated Python interpreter along with it. Open your Terminal application and run: xcode-select --install. This will open a window.
🌐
PyPI
pypi.org › project › github
github · PyPI
Easy to use Python wrapper for the Github API.
🌐
Reddit
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?

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.

🌐
PyTutorial
pytutorial.com › install-python-packages-from-github
PyTutorial | Install Python Packages from GitHub
May 25, 2025 - The easiest way is using pip with the GitHub repository URL. pip install git+https://github.com/username/repository.git
🌐
Medium
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.
🌐
Peterefrancis
peterefrancis.com › python-course › python_and_git.html
Introduction to Python | Installing Python and Git
Search for and install the "language-python" and "teletype" packages (if they are not already instsalled). Open a terminal window and enter the following line: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Press the enter key to run.
🌐
PyPI
pypi.org › project › PyGithub
PyGithub · PyPI
This library enables you to manage GitHub resources such as repositories, user profiles, and organizations in your Python applications.
🌐
GitHub
github.com › aisichenko › install_python
GitHub - aisichenko/install_python: How to install Python on your Windows machine in lab. · GitHub
Many python packages are installed using makeand Makefiles. To do this, you can install chocolatey. Here's how: First, login to GitHub (make sure you have made a Github account - with UCSB email, you can make a Pro version)
Author: aisichenko
🌐
GitHub
github.com › actions › setup-python
GitHub - actions/setup-python: Set up your GitHub Actions workflow with a specific version of Python · GitHub
This action provides the following functionality for GitHub Actions users: Installing a version of Python or PyPy and (by default) adding it to the PATH
🌐
LinkedIn
linkedin.com › pulse › how-do-i-install-python-package-from-github-make-run-sinkevicius
How do I install a Python package from GitHub and make it run?
June 5, 2022 - For example, here is the Twitter for Python project page. Once you find the package you want, click its ZIP button and download it to your computer. Unzip the package, then move it to a new directory named after the package.