简体   繁体   English

在Windows上构建QScintilla失败

[英]Building QScintilla on Windows fails

I was able to build the most recent version of QScintilla (2.9.1) on Ubuntu 15.10. 我能够在Ubuntu 15.10上构建最新版本的QScintilla(2.9.1)。 I have tried building the same version on Windows 10 using Qt 5.6. 我尝试使用Qt 5.6在Windows 10上构建相同的版本。 QMake run to completion without giving errors. QMake运行完成而不会出错。 A call to Make gives the following error message: 对Make的调用给出以下错误消息:

make -f Makefile.Release
make[1]: Entering directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
Makefile.Release:822: *** missing separator.  Stop.
make[1]: Leaving directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
makefile:34: recipe for target 'release' failed
make: *** [release] Error 2

What am I doing wrong? 我究竟做错了什么? How can I solve it? 我该如何解决?

I ran into similar issues. 我遇到了类似的问题。 I eventually got a working 'QScintilla' on my Windows 10 machine as described below. 我最终在我的Windows 10机器上运行了'QScintilla',如下所述。

My PC has the following specifications: 我的电脑有以下规格:


STEP 1: 第1步:

Download the file QScintilla-2.9.2-cp35-none-win_amd64.whl from the site https://pypi.python.org/pypi/QScintilla . https://pypi.python.org/pypi/QScintilla网站下载文件QScintilla-2.9.2-cp35-none-win_amd64.whl Put the file in the folder: 将文件放在文件夹中:

C: \\ .. \\ Anaconda \\ Scripts \\ C:\\ .. \\ Anaconda \\ Scripts \\

We will use this .whl file to do the installation of QScintilla. 我们将使用此.whl文件来安装QScintilla。

_ _

STEP 2: 第2步:

Open the Windows cmd tool with Administrator privileges! 使用管理员权限打开Windows cmd工具! Now type the following command: 现在输入以下命令:

> cd "C:\..\Anaconda\Scripts"

This brings the cmd shell to the right spot. 这会将cmd shell带到正确的位置。 Now type the following command: 现在输入以下命令:

> pip3 install QScintilla

If all goes well, you get the following message: 如果一切顺利,您会收到以下消息:

> pip3 install QScintilla

    Collecting QScintilla
      Downloading QScintilla-2.9.2-cp35-none-win_amd64.whl (1.6MB)
        100% |################################| 1.6MB 984kB/s
    Collecting PyQt5 (from QScintilla)
      Downloading PyQt5-5.6-cp35-none-win_amd64.whl (74.7MB)
        100% |################################| 74.7MB 23kB/s
    Collecting sip (from PyQt5->QScintilla)
      Downloading sip-4.18-cp35-none-win_amd64.whl (46kB)
        100% |################################| 51kB 5.7MB/s
    Installing collected packages: sip, PyQt5, QScintilla
    ..
    Successfully installed PyQt5-5.6 QScintilla-2.9.2 sip-4.18

_ _

STEP 3: 第3步:

I did not get the message "Successfully installed" from the first shot. 我没有收到第一张照片中“成功安装”的消息。 Instead I got the following error message: 相反,我收到以下错误消息:

PermissionError: [Errno 13] Permission denied: 'C:\..\anaconda\Lib\site-packages\sip.pyd'

Apparently the file sip.pyd sitting in the directory C:\\..\\anaconda\\Lib\\site-packages could not be accessed. 显然,无法访问位于目录C:\\..\\anaconda\\Lib\\site-packages的文件sip.pyd So I opened another Windows command shell (of course again with Administrator privileges!) and typed the following command: 所以我打开了另一个Windows命令shell(当然再次使用管理员权限!)并输入以下命令:

> icacls "C:\..\Anaconda\Lib\site-packages" /grant "Administrators":(OI)(CI)F /T

This command will give full access rights (read - modify and write) to all "Administrator" users for all the files in the site-packages folder, and all the files in its subfolders. 此命令将为site-packages文件夹中的所有文件以及其子文件夹中的所有文件提供对所有“Administrator”用户的完全访问权限(读取 - 修改和写入)。 While this command executes, you should get the following messages: 执行此命令时,您应该收到以下消息:

    ...
    processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\readline.cpython-35.pyc
    processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\simplegeneric.cpython-35.pyc
    processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\six.cpython-35.pyc
    processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_path.cpython-35.pyc
    processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_pycosat.cpython-35.pyc
    ...

    Successfully processed 38589 files; Failed processing 0 files

Now you can repeat STEP 2, and it should work! 现在你可以重复步骤2,它应该可以工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM