Pip install Scrappy - “python setup.py egg_info”失败,错误代码为1

时间:2017-04-05 16:17:39

标签: python windows scrapy pip

我正在尝试安装Scrappy。我安装了Python 3.6,并在Windows上。

我试过这个:

py -3.5-32 -m pip install Scrappy

然而,得到以下内容:

Collecting Scrappy
  Using cached Scrappy-0.3.0.alpha.4.tar.gz
Collecting guessit (from Scrappy)
  Using cached guessit-2.1.2.tar.gz
Collecting tvdb_api (from Scrappy)
  Using cached tvdb_api-1.10.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\USER~1.NAME\AppData\Local\Temp\pip-build-1tu2hkos\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\USER~1.NAME\AppData\Local\Temp\pip-build-1tu2hkos\hachoir-metadata\

这是因为setuptools?所以我升级了它然后尝试安装Scrappy但得到了相同的错误消息。

有人知道为什么会这样吗?

更新,尝试安装Scrapy时出错:

  

错误:需要Microsoft Visual C ++ 14.0。用“微软”来获取它   Visual C ++构建工具“:   http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------
Command "C:\Users\user.name\AppData\Local\Programs\Python\Python35-32\python.exe
     

-u -c“import setuptools,tokenize; file ='C:\ Users \ USER~1.NAME \ AppData \ Local \ Temp \ pip-build-j6ijek3o \ Twisted \ setup。 PY'; F = GETATTR(标记化,   'open',open)( file ); code = f.read()。replace('\ r \ n',   '\ n'); f.close(); exec(编译(代码,文件,'exec'))“安装   --record C:\ Users \ USER~1.NAME \ AppData \ Local \ Temp \ pip-bmjl_u_2-record \ install-record.txt   --single-version-external-managed --compile“失败,错误代码为1   C:\ Users \用户USER〜1.NAME \应用程序数据\本地\ TEMP \ PIP-集结j6ijek3o \扭曲\

1 个答案:

答案 0 :(得分:2)

pip install Scrapy

Scrapy,而不是斗志

Scrapy Installation Guide