如何通过 Git Bash (amazon-crawler) 安装这个 github 包

How do I install this github package via Git Bash (amazon-crawler)

我正在尝试让 this github 包工作。我安装了 python 3.9、pip 20.2.3 和 git 2.28.0.windows.1(所有最新版本)。 当我尝试在 git bash 中使用以下代码下载软件包时,出现错误。

命令:

pip install git+https://github.com/hartleybrody/public-amazon-crawler.git

错误:

Collecting git+https://github.com/hartleybrody/public-amazon-crawler.git
  Cloning https://github.com/hartleybrody/public-amazon-crawler.git to c:\users\chris\appdata\local\temp\pip-req-build-ji37p4r1
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\chris\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Chris\AppData\Local\Temp\pip-req-build-ji37p4r1\setup.py'"'"'; __file__='"'"'C:\Users\Chris\AppData\Local\Temp\pip-req-build-ji37p4r1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Chris\AppData\Local\Temp\pip-pip-egg-info-pvkyer2s'
         cwd: C:\Users\Chris\AppData\Local\Temp\pip-req-build-ji37p4r1\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\chris\appdata\local\programs\python\python39\lib\tokenize.py", line 392, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Chris\AppData\Local\Temp\pip-req-build-ji37p4r1\setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我也试过只下载 .zip 并手动解压,但是在 requirements.txt.

中尝试安装依赖项时我失败了

命令:

pip install -r requirements.txt

错误:

Collecting BeautifulSoup==3.2.1
  Using cached BeautifulSoup-3.2.1.tar.gz (31 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\chris\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Chris\AppData\Local\Temp\pip-install-kt7dwwof\beautifulsoup\setup.py'"'"'; __file__='"'"'C:\Users\Chris\AppData\Local\Temp\pip-install-kt7dwwof\beautifulsoup\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Chris\AppData\Local\Temp\pip-pip-egg-info-s9pbmuar'
         cwd: C:\Users\Chris\AppData\Local\Temp\pip-install-kt7dwwof\beautifulsoup\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-kt7dwwof\beautifulsoup\setup.py", line 22
        print "Unit tests have failed!"
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Unit tests have failed!")?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我现在的问题是:“我如何让它工作?”。爬虫只是损坏或过时了,还是我需要使用 git bash 以外的东西,还是我的一个简单疏忽?

第一个错误 — 存储库没有 setup.py,因此无法 pip 安装。

第二个错误 — requirements.txt 列出了 BeautifulSoup 而不是 BeautifulSoup4,所以它只有 Python2。