尝试在Pycharm中安装Scrapy并不断出现错误:命令“ python setup.py egg_info”失败,错误代码为1

时间:2019-07-10 20:21:38

标签: python-3.x scrapy pycharm

我正在尝试为PyCharm中的项目安装Scrapy,但始终收到上述错误消息。

我尝试过更新pip和setuptools(通过Pycharm的设置以及通过终端),重新启动PyCharm和重新启动计算机。

Complete output from command python setup.py egg_info:
    Download error on https://pypi.org/simple/incremental/: [WinError 10054] An existing connection was forcibly closed by the remote host -- Some packages may not be found!
    Couldn't find index page for 'incremental' (maybe misspelled?)
    Download error on https://pypi.org/simple/: [WinError 10054] An existing connection was forcibly closed by the remote host -- Some packages may not be found!
    No local packages or working download links found for incremental>=16.10.1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\kdeem\AppData\Local\Temp\pip-install-_380qxbx\Twisted\setup.py", line 20, in <module>
        setuptools.setup(**_setup["getSetupArgs"]())
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\setuptools\__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\setuptools\dist.py", line 717, in fetch_build_eggs
        replace_conflicting=True,
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\pkg_resources\__init__.py", line 782, in resolve
        replace_conflicting=replace_conflicting
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
        return installer(requirement)
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\setuptools\dist.py", line 784, in fetch_build_egg
        return cmd.easy_install(req)
      File "C:\Users\kdeem\.PyCharmCE2019.1\Timesheets\lib\site-packages\setuptools\command\easy_install.py", line 673, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')```

1 个答案:

答案 0 :(得分:0)

我在这里发布了指向另一个解决该问题的答案的链接。原来我需要先更新增量。

Answer