pip Installing a python module in Python 3,但是那个模块有一个依赖包需要Python 2

pip Installing a python module in Python 3, but that module has a dependency package that requires Python 2

所以我是 Python 的新手,学习它的好方法是做一些个人项目:) 所以我在 Windows 上并使用 virtualenv 来包含环境

所以,我需要使用 Scrappy 模块:

pip install scrappy

Collecting scrappy
  Using cached Scrappy-0.3.0.alpha.4.tar.gz
Collecting guessit (from scrappy)
  Using cached guessit-2.1.4.tar.gz
Collecting tvdb_api (from scrappy)
  Using cached tvdb_api-2.0.tar.gz
Collecting hachoir-metadata (from scrappy)
  Using cached hachoir-metadata-1.3.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\hachoir-metadata\setup.py", line 65
        except OSError, err:
                      ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\h
achoir-metadata\

因为hachoir-metadata是Python2依赖包,所以我尝试安装他们的Python3版本

pip install hachoir3

我确认它是使用

安装的

pip list | Select-String hachoir3

所以我尝试了运行

pip install scrappy

但同样的错误。

是否可以解决安装 scrappy 的问题?我不能下降到 Python 2.

谢谢!

Scrappy 本身 contains code 仅适用于 Python 2. 即Scrappy 不能与 Python 3+ 一起使用。