使用 pip 安装下载的 tar.gz 文件 [英] Installing downloaded tar.gz files with pip

查看:142
本文介绍了使用 pip 安装下载的 tar.gz 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 PyGUI-2.5.4.tar.gz 时="noreferrer">http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ 然后运行

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

知道我做错了什么吗?

推荐答案

您可以使用 pip 安装 tar.gz 安装特定的源存档文件.

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

pip install ./Package-1.0.4.tar.gz

您也可以通过解压 tar.gz 文件来安装它.首先,您应该使用 tar 命令提取它.

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

然后使用 setup.py 文件安装包.

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

python setup.py install

sudo python setup.py install

(仅在 linux 中使用 sudo )

( use sudo only in linux )

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

这篇关于使用 pip 安装下载的 tar.gz 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆