我正在尝试从GitHub安装pdfminer,但遇到一些错误。
这引发了错误:
pip install git+git://github.com/pdfminer/pdfminer.six
这引发了错误:
pip install git+https://github.com/pdfminer/pdfminer.six
这引发了错误:
git clone https://github.com/pdfminer/pdfminer.six
我在网上搜索了一个解决方案,并从这里找到了上面列出的想法: How to install Python package from GitHub?
这些命令似乎适用于其他几个人,但是这些命令对我不起作用。我正在尝试在Anaconda Prompt中运行这三个命令。我正在使用Python 3.6。
也许在我这边配置不正确,但是我无法想象它是什么。还是其他?
顺便说一句,这是我得到的错误:
(base) C:\Users\Excel>pip install https://github.com/pdfminer/pdfminer.six
Collecting https://github.com/pdfminer/pdfminer.six
Downloading https://github.com/pdfminer/pdfminer.six
\ 102kB 1.3MB/s
Cannot unpack file C:\Users\Excel\AppData\Local\Temp\pip-unpack-6kqx4igo\pdfmi
ner.six (downloaded from C:\Users\Excel\AppData\Local\Temp\pip-req-build-2bpsgsh
0, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of C:\Users\Excel\AppData\Local\Temp\pip-req-bui
ld-2bpsgsh0
(base) C:\Users\Excel>pip install git+https://github.com/pdfminer/pdfminer.six
Collecting git+https://github.com/pdfminer/pdfminer.six
Cloning https://github.com/pdfminer/pdfminer.six to c:\users\excel\appdata\loc
al\temp\pip-req-build-iqvj3zbl
Error [WinError 2] The system cannot find the file specified while executing c
ommand git clone -q https://github.com/pdfminer/pdfminer.six C:\Users\Excel\AppD
ata\Local\Temp\pip-req-build-iqvj3zbl
Cannot find command 'git' - do you have 'git' installed and in your PATH?
(base) C:\Users\Excel>git clone https://github.com/pdfminer/pdfminer.six
'git' is not recognized as an internal or external command,
operable program or batch file.
答案 0 :(得分:1)
我认为您没有克隆正确的网址。您收到与链接的问题相同的“无法解压缩”错误,暗示它可能是完全相同的问题。
尝试:
pip install git+https://github.com/pdfminer/pdfminer.six.git
或
pip install git+git://github.com/pdfminer/pdfminer.six.git
通常git repos以.git
结尾,当我从github将其添加到剪贴板时,这就是我得到的URL。
您也可以尝试pip install pdfminer.six
,我直接从他们的文档中复制了https://github.com/pdfminer/pdfminer.six/blob/master/README.md