从<PyQt5.QtWebEngineWidgets import QWebEnginePage&gt;用错误的名称调用ValueError:PyCapsule_GetPointer. [英] ValueError:PyCapsule_GetPointer called with incorrect name with &lt;from PyQt5.QtWebEngineWidgets import QWebEnginePage&gt;

查看:502
本文介绍了从<PyQt5.QtWebEngineWidgets import QWebEnginePage&gt;用错误的名称调用ValueError:PyCapsule_GetPointer.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这已经由我自己解决了,但是我将这个问题转给其他人. 我认为这种问题尽可能地好. 而且似乎没有SOF.

我更新了spyder.

conda update spyder
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: C:\Anaconda3

  added / updated specs:
    - spyder


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    anaconda-custom            |   py36h363777c_0           9 KB
    spyder-3.3.4               |           py36_0         2.6 MB
    spyder-kernels-0.4.4       |           py36_0          68 KB
    ------------------------------------------------------------
                                           Total:         2.7 MB

The following packages will be UPDATED:

  spyder                                       3.3.3-py36_0 --> 3.3.4-py36_0
  spyder-kernels                               0.4.2-py36_0 --> 0.4.4-py36_0

The following packages will be DOWNGRADED:

  anaconda                                   2019.03-py36_0 --> custom-py36h363777c_0

当我尝试启动spyder时. 从快捷方式图标,没有应用程序发生. 所以我写了这个cmd.

 C:\Users\****>spyder


但是我有这个错误


Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Anaconda3\lib\site-packages\spyder\app\start.py", line 186, in main
    from spyder.app import mainwindow
  File "C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 90, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "C:\Anaconda3\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name

因此,我搜索了此页面./p>

我遵循了解决方案. 但这不是同一个问题.

下一个问题发生.

python: can't open file 'configure.py': [Errno 2] No such file or directory

我该如何解决?


Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]

解决方案

解决方案是降级PyQt5.

pip install PyQt5==5.10.1
Collecting PyQt5==5.10.1
  Downloading https://files.pythonhosted.org/packages/a7/22/67cc2bac6ae2cd3a7eabb2a2e91638b94bdc6e0503747e49670ce44bb5b0/PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-none-win_amd64.whl (81.0MB)
    100% |████████████████████████████████| 81.0MB 187kB/s
Requirement already satisfied: sip<4.20,>=4.19.4 in c:\anaconda3\lib\site-packages (from PyQt5==5.10.1) (4.19.8)
spyder 3.3.4 requires pyqtwebengine<5.13, which is not installed.
Installing collected packages: PyQt5
  Found existing installation: PyQt5 5.12.1
    Uninstalling PyQt5-5.12.1:
      Successfully uninstalled PyQt5-5.12.1
Successfully installed PyQt5-5.10.1

发生此问题的原因是,我安装的PyQt5的版本超出了spyder的版本.

This is already solved by myself but I put this question for someone else. I think this kind of problem is better as much as we can. and there doesn't seem be in SOF.

I updated spyder.

conda update spyder
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: C:\Anaconda3

  added / updated specs:
    - spyder


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    anaconda-custom            |   py36h363777c_0           9 KB
    spyder-3.3.4               |           py36_0         2.6 MB
    spyder-kernels-0.4.4       |           py36_0          68 KB
    ------------------------------------------------------------
                                           Total:         2.7 MB

The following packages will be UPDATED:

  spyder                                       3.3.3-py36_0 --> 3.3.4-py36_0
  spyder-kernels                               0.4.2-py36_0 --> 0.4.4-py36_0

The following packages will be DOWNGRADED:

  anaconda                                   2019.03-py36_0 --> custom-py36h363777c_0

When I tried to boot up spyder. From shortcut icon, no application occurs. So I write this cmd.

 C:\Users\****>spyder


But I have this error


Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Anaconda3\lib\site-packages\spyder\app\start.py", line 186, in main
    from spyder.app import mainwindow
  File "C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 90, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "C:\Anaconda3\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name

So, I have searched this page.

I followed the solution. But it was not the same problem.

the next problem occurs.

python: can't open file 'configure.py': [Errno 2] No such file or directory

How do I solve it?


Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]

解决方案

The solution is to downgrade PyQt5.

pip install PyQt5==5.10.1
Collecting PyQt5==5.10.1
  Downloading https://files.pythonhosted.org/packages/a7/22/67cc2bac6ae2cd3a7eabb2a2e91638b94bdc6e0503747e49670ce44bb5b0/PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-none-win_amd64.whl (81.0MB)
    100% |████████████████████████████████| 81.0MB 187kB/s
Requirement already satisfied: sip<4.20,>=4.19.4 in c:\anaconda3\lib\site-packages (from PyQt5==5.10.1) (4.19.8)
spyder 3.3.4 requires pyqtwebengine<5.13, which is not installed.
Installing collected packages: PyQt5
  Found existing installation: PyQt5 5.12.1
    Uninstalling PyQt5-5.12.1:
      Successfully uninstalled PyQt5-5.12.1
Successfully installed PyQt5-5.10.1

This problem occurs because the PyQt5 I installed is beyond version as the version of spyder.

这篇关于从<PyQt5.QtWebEngineWidgets import QWebEnginePage&gt;用错误的名称调用ValueError:PyCapsule_GetPointer.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆