简体   繁体   English

无法使用pip从github安装库

[英]unable to install library from github using pip

I have forked this repo . 我已经分叉了这个仓库 I'm trying to install this from my repo using pip since I have made some changes but its constantly failing. 我正在尝试使用pip从我的仓库中安装它,因为我进行了一些更改,但是它经常失败。 I tried few things but no luck: 我尝试了几件事,但没有运气:

pip install -e git+https://github.com/rshiva/python-boilerpipe.git#egg=python-boilerpipe
-e git://github.com:rshiva/python-boilerpipe.git#egg=python-boilerpipe

Error I get is 我得到的错误是

no matches found

Why do we have to mention egg ? 为什么我们不得不提鸡蛋? What is the right way to do this? 什么是正确的方法?

Your first pip command-line is correct, but the installation fails. 您的第一个pip命令行正确,但是安装失败。

That's because the repo contains a broken copy of the boilerplate-1.2.0-bin.tar.gz file . 这是因为回购包含boilerplate-1.2.0-bin.tar.gz文件boilerplate-1.2.0-bin.tar.gz文件损坏副本 The setup.py script finds this file, will not download a fresh copy, but because the file is incomplete extracting that file fails: setup.py脚本会找到此文件,不会下载新副本,但是由于文件不完整,因此无法提取该文件:

Updating ./src/python-boilerpipe clone
Running setup.py (path:/Users/mj/Development/venvs/stackoverflow-3.4/src/python-boilerpipe/setup.py) egg_info for package python-boilerpipe
Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/Users/mj/Development/venvs/stackoverflow-3.4/src/python-boilerpipe/setup.py", line 27, in <module>
    download_jars(datapath=DATAPATH)
  File "/Users/mj/Development/venvs/stackoverflow-3.4/src/python-boilerpipe/setup.py", line 22, in download_jars
    for tarinfo in tar.getmembers():
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/tarfile.py", line 1738, in getmembers
    self._load()        # all members, we first have to
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/tarfile.py", line 2311, in _load
    tarinfo = self.next()
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/tarfile.py", line 2246, in next
    self.fileobj.seek(self.offset)
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/gzip.py", line 573, in seek
    self.read(1024)
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/gzip.py", line 365, in read
    if not self._read(readsize):
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/gzip.py", line 449, in _read
    self._read_eof()
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/gzip.py", line 482, in _read_eof
    crc32, isize = struct.unpack("<II", self._read_exact(8))
  File "/Users/mj/Development/Library/buildout.python/parts/opt/lib/python3.4/gzip.py", line 286, in _read_exact
    raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached

Remove this file from your repository, and your installation works just fine. 从您的存储库中删除该文件,安装就可以正常进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM