Windows上的GoogleScraper - 错误setup.py egg_info

时间:2016-06-05 13:45:35

标签: python windows pip

我在使用python安装GoogleScraper时遇到问题。我搞不清楚了。 看我的问题: Capture

 File "C:\Python34\lib\distutils\command\build_py.py", line 55, in finalize_options

    self.package_dir[name] = convert_path(path)

  File "C:\Python34\lib\distutils\util.py", line 127, in convert_path

    raise ValueError("path '%s' cannot end with '/'" % pathname)

ValueError: path 'examples/' cannot end with '/'

----------------------------------------
Cleaning up...
  Removing temporary dir C:\Users\Billy\AppData\Local\Temp\pip_build_Billy...
Command python setup.py egg_info failed with error code 1 in C:\Users\Billy\AppData\Local\Temp\pip_build_Billy\GoogleScraper
Exception information:
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python34\lib\site-packages\pip\req.py", line 1229, in prepare_files
    req_to_install.run_egg_info()
  File "C:\Python34\lib\site-packages\pip\req.py", line 325, in run_egg_info
    command_desc='python setup.py egg_info')
  File "C:\Python34\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in C:\Users\Billy\AppData\Local\Temp\pip_build_Billy\GoogleScraper

我已经尝试了很多解决此问题的方法,例如GoogleScraper https://github.com/NikolaiT/GoogleScraper#on-windows

的文档中所述

我也尝试过运行命令

  

python ez_setup.py

但它不适合我。

请帮助我。

1 个答案:

答案 0 :(得分:6)

我用这个解决方案解决了我的问题 - > Github

我删除了文件中的斜杠" setup.py"正确安装GoogleScraper。

转到第24行进行更改。

        packages=['GoogleScraper'],
        entry_points={'console_scripts': ['GoogleScraper = GoogleScraper.core:main']},
 -      package_dir={'examples': 'examples/'},
 +      package_dir={'examples': 'examples'},
        install_requires=requirements
  )