Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用Qt5的QWebEngine_Python_Pyqt5_Qwebengine - Fatal编程技术网

Python 使用Qt5的QWebEngine

Python 使用Qt5的QWebEngine,python,pyqt5,qwebengine,Python,Pyqt5,Qwebengine,解决方案: 我卸载了Windows中所有版本的Python 我安装了python 3.9@C:\python 我用pip安装了PyQt5、PyQt5工具 我通过(命令python setup.py build和python setup.py install)安装了pyinstaller 我将C:\Python和C:\Python\脚本添加到环境路径中 我将项目移动到C:\Python\Scripts 我用 pyinstaller--name=“Papinhio player”--图

解决方案:

  • 我卸载了Windows中所有版本的Python

  • 我安装了python 3.9@C:\python

  • 我用pip安装了PyQt5、PyQt5工具

  • 我通过(命令
    python setup.py build
    python setup.py install
    )安装了pyinstaller

  • 我将C:\Python和C:\Python\脚本添加到环境路径中

  • 我将项目移动到C:\Python\Scripts

  • 我用

  • pyinstaller--name=“Papinhio player”--图标=../src/media/images/Papinhio_player.ico../src/main/python_files/Papinhio_player.py

    指挥部

  • 我将resources文件夹的内容复制到dist文件夹(从C:\Python\Scripts\Papinhio player\exe\dist\Papinhio player\PyQt5\Qt\resources复制到C:\Python\Scripts\Papinhio player\exe\dist)

  • 我将QtWebEngineProcess.exe从C:\Python\Scripts\Papinhio player\exe\dist\Papinhio player\PyQt5\Qt\bin复制到C:\Python\Scripts\Papinhio player\exe\dist

  • 就这些

    我有如下警告:

    Qt WebEngine resources not found at C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt/resources. Trying parent directory...
    Qt WebEngine resources not found at C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt. Trying application directory...
    Installed Qt WebEngine locales directory not found at location C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt/translations\qtwebengine_locales. Trying application directory...
    Qt WebEngine locales directory not found at location C:/Users/???????/AppData/Local/Programs/Python/Python38\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
    js: Unrecognized feature: 'clipboard-write'.
    js: A cookie associated with a cross-site resource at http://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    js: A cookie associated with a cross-site resource at http://www.youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    
    但网站显示正确

    Qt WebEngine resources not found at C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt/resources. Trying parent directory...
    Qt WebEngine resources not found at C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt. Trying application directory...
    Installed Qt WebEngine locales directory not found at location C:/Users/?n?ooio/AppData/Local/Programs/Python/Python38/lib/site-packages/PyQt5/Qt/translations\qtwebengine_locales. Trying application directory...
    Qt WebEngine locales directory not found at location C:/Users/???????/AppData/Local/Programs/Python/Python38\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
    js: Unrecognized feature: 'clipboard-write'.
    js: A cookie associated with a cross-site resource at http://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    js: A cookie associated with a cross-site resource at http://www.youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    
    Qt WebEngine resources not found at C:/Users/EFFA~1/AppData/Local/Temp/resources. Trying parent directory...
    Qt WebEngine resources not found at C:/Users/EFFA~1/AppData/Local/Temp. Trying application directory...
    Installed Qt WebEngine locales directory not found at location C:/Users/EFFA~1/AppData/Local/Temp/translations\qtwebengine_locales. Trying application directory...
    Qt WebEngine locales directory not found at location C:/Python/Scripts/Papinhio player/exe/dist\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
    js: Unrecognized feature: 'clipboard-write'.
    js: A cookie associated with a cross-site resource at http://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    js: A cookie associated with a cross-site resource at http://www.youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.