19

我需要为 python 安装dryscrape,但出现错误,有什么问题?

C:\Users\parvij\Anaconda3\Scripts>pip install dryscrape

我懂了:

Collecting dryscrape
Collecting webkit-server>=1.0 (from dryscrape)
  Using cached webkit-server-1.0.tar.gz
Collecting xvfbwrapper (from dryscrape)
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\users\parvij\anaconda3\lib\site-packages (from dryscrape)
Building wheels for collected packages: webkit-server
  Running setup.py bdist_wheel for webkit-server ... error
  Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\parvij\AppData\Local\Temp\tmp71w59qv6pip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  'make' is not recognized as an internal or external command,
  operable program or batch file.
  error: [Errno 2] No such file or directory: 'src/webkit_server'

  ----------------------------------------
  Failed building wheel for webkit-server
  Running setup.py clean for webkit-server
Failed to build webkit-server
Installing collected packages: webkit-server, xvfbwrapper, dryscrape
  Running setup.py install for webkit-server ... error
    Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open',open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    error: [Errno 2] No such file or directory: 'src/webkit_server'

    ----------------------------------------
Command "c:\users\parvij\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\parvij\AppData\Local\Temp\pip-build-o7nlv0dz\webkit-server\

我的操作系统是windows 8

我的python版本是3.5

4

4 回答 4

57

从 github 下载 webkit-server

git clone https://github.com/niklasb/webkit-server.git webkit-server

更改 webkit-server/setup.py :

shutil.copy('src/webkit_server', self.build_purelib)
shutil.copy('src/webkit_server', self.build_platlib)

shutil.copy('src/webkit_server.pro', self.build_purelib)
shutil.copy('src/webkit_server.pro', self.build_platlib)

然后

cd webkit-server
python setup.py install

你去吧。

于 2017-03-15T12:32:15.547 回答
3

需要安装http://www.qt.io。此外,Qt 5.6+ 版本删除了 Qt WebKit 模块,取而代之的是新模块 Qt WebEngine。到目前为止,webkit-server 还没有被移植到 WebEngine(并且可能不会在不久的将来),所以 Qt <= 5.5 是一个要求。

于 2017-03-10T09:44:39.993 回答
-1

文档中,您还必须安装要求。您可以按以下方式执行此操作

pip install -r requirements.txt

在此之后重试安装dryscrape

于 2016-08-05T12:15:56.477 回答
-1

需要安装qt4libqtwebkit-dev编译webkit-server,然后按照@Erwan Clügairtz的步骤

sudo apt install libqtwebkit-dev qt4

于 2020-07-22T18:16:29.817 回答