Search code examples
pythonpippygui

Installing downloaded tar.gz files with pip


When I download PyGUI-2.5.4.tar.gz from http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ and then run

pip install downloads/PyGUI-2.5.4.tar.gz

I get a long error, the root of which appears to be the following:

tarfile.ReadError: not a gzip file

Any ideas what I'm doing wrong?


Solution

  • You can install tar.gz with pip Install a particular source archive file.

    pip install ./Package-1.0.4.tar.gz
    

    You can also install it with extracting tar.gz file. First you should extract it using using tar command.

    tar -xzvf PyGUI-2.5.4.tar.gz
    cd PyGUI-2.5.4.tar.gz
    

    And then use the setup.py file to install the package .

    python setup.py install
    

    or

    sudo python setup.py install
    

    ( use sudo only in linux )

    Source: https://pip.readthedocs.io/en/stable/reference/pip_install/#git