当前位置:   article > 正文

spyder 无法启动,跟pyqt有关,折腾半天终于好了_spyder 4.1.5 requires pyqt5<5.13; python_version >

spyder 4.1.5 requires pyqt5<5.13; python_version >= "3", which is not instal

(base) C:\Users\25023>spyder return
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 41, in check_qt
import qtpy
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 210, in
raise PythonQtError(‘No Qt bindings could be found’)
qtpy.PythonQtError: No Qt bindings could be found

(base) C:\Users\25023>pip install pyqt5
Requirement already satisfied: pyqt5 in c:\users\25023\appdata\roaming\python\python38\site-packages (5.15.4)
Collecting PyQt5-Qt5>=5.15
Using cached PyQt5_Qt5-5.15.2-py3-none-win32.whl (43.4 MB)
Collecting PyQt5-sip<13,>=12.8
Using cached PyQt5_sip-12.9.0-cp38-cp38-win32.whl (51 kB)
Installing collected packages: PyQt5-Qt5, PyQt5-sip
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= “3”, which is not installed.
spyder 4.1.5 requires pyqt5<5.13; python_version >= “3”, but you’ll have pyqt5 5.15.4 which is incompatible.
Successfully installed PyQt5-Qt5-5.15.2 PyQt5-sip-12.9.0

(base) C:\Users\25023>pip install --use-feature=2020-resolver pyqt5
Requirement already satisfied: pyqt5 in c:\users\25023\appdata\roaming\python\python38\site-packages (5.15.4)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\25023\anaconda3\lib\site-packages (from pyqt5) (12.9.0)
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\users\25023\anaconda3\lib\site-packages (from pyqt5) (5.15.2)

(base) C:\Users\25023>conda install pyqt
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: C:\Users\25023\anaconda3

added / updated specs:
- pyqt

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
conda-4.10.3               |   py38h9f7ea03_0         2.9 MB
------------------------------------------------------------
                                       Total:         2.9 MB
  • 1
  • 2
  • 3
  • 4
  • 5

The following packages will be UPDATED:

conda 4.9.2-py38h9f7ea03_0 --> 4.10.3-py38h9f7ea03_0

Proceed ([y]/n)? y

Downloading and Extracting Packages
conda-4.10.3 | 2.9 MB | ########################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(base) C:\Users\25023>conda install pyqt
Collecting package metadata (current_repodata.json): done
Solving environment: done

All requested packages already installed.

(base) C:\Users\25023>spyder
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named ‘PySide’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 41, in check_qt
import qtpy
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 210, in
raise PythonQtError(‘No Qt bindings could be found’)
qtpy.PythonQtError: No Qt bindings could be found

(base) C:\Users\25023>brew install pyqt
‘brew’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>unset QT_API
‘unset’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>QT_AP
‘QT_AP’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>QT_API
‘QT_API’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>LD_LIBRARY_PATH
‘LD_LIBRARY_PATH’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>path
PATH=C:\Users\25023\anaconda3;C:\Users\25023\anaconda3\Library\mingw-w64\bin;C:\Users\25023\anaconda3\Library\usr\bin;C:\Users\25023\anaconda3\Library\bin;C:\Users\25023\anaconda3\Scripts;C:\Users\25023\anaconda3\bin;C:\Users\25023\anaconda3\condabin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\25023\AppData\Local\Microsoft\WindowsApps;.;C:\Users\25023\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\25023\AppData\Roaming\npm

(base) C:\Users\25023>spyder --new-instance
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named ‘PySide’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 215, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 41, in check_qt
import qtpy
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 210, in
raise PythonQtError(‘No Qt bindings could be found’)
qtpy.PythonQtError: No Qt bindings could be found

(base) C:\Users\25023>python
Python 3.8.5 (default, Sep 4 2020, 00:03:40) [MSC v.1916 32 bit (Intel)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.

from PySide import version as PYSIDE_VERSION
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘PySide’

quit
Use quit() or Ctrl-Z plus Return to exit

quit()

(base) C:\Users\25023>pip install pyside2
Collecting pyside2
Downloading PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win32.whl (115.8 MB)
|████████████████████████████████| 115.8 MB 819 kB/s
Collecting shiboken2==5.15.2
Downloading shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win32.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 819 kB/s
Installing collected packages: shiboken2, pyside2
Successfully installed pyside2-5.15.2 shiboken2-5.15.2

(base) C:\Users\25023>spyder
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 42, in check_qt
package_name, required_ver = qt_infos[qtpy.API]
KeyError: ‘pyside2’

(base) C:\Users\25023>spyder return
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 42, in check_qt
package_name, required_ver = qt_infos[qtpy.API]
KeyError: ‘pyside2’

(base) C:\Users\25023>python
Python 3.8.5 (default, Sep 4 2020, 00:03:40) [MSC v.1916 32 bit (Intel)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.
Failed calling sys.interactivehook
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site.py”, line 440, in register_readline
readline.read_history_file(history)
File “C:\Users\25023\anaconda3\lib\site-packages\pyreadline\rlmain.py”, line 165, in read_history_file
self.mode._history.read_history_file(filename)
File “C:\Users\25023\anaconda3\lib\site-packages\pyreadline\lineeditor\history.py”, line 82, in read_history_file
for line in open(filename, ‘r’):
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x9a in position 27: illegal multibyte sequence

import PySide2
quit()

(base) C:\Users\25023>spyder return
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 42, in check_qt
package_name, required_ver = qt_infos[qtpy.API]
KeyError: ‘pyside2’

(base) C:\Users\25023>pip install pyqtwebengine -U
Collecting pyqtwebengine
Downloading PyQtWebEngine-5.15.4-cp36.cp37.cp38.cp39-none-win32.whl (157 kB)
|████████████████████████████████| 157 kB 726 kB/s
Requirement already satisfied, skipping upgrade: PyQt5-sip<13,>=12.8 in c:\users\25023\anaconda3\lib\site-packages (from pyqtwebengine) (12.9.0)
Requirement already satisfied, skipping upgrade: PyQt5>=5.15.4 in c:\users\25023\appdata\roaming\python\python38\site-packages (from pyqtwebengine) (5.15.4)
Collecting PyQtWebEngine-Qt5>=5.15
Downloading PyQtWebEngine_Qt5-5.15.2-py3-none-win32.whl (50.2 MB)
|████████████████████████████████| 50.2 MB 930 kB/s
Requirement already satisfied, skipping upgrade: PyQt5-Qt5>=5.15 in c:\users\25023\anaconda3\lib\site-packages (from PyQt5>=5.15.4->pyqtwebengine) (5.15.2)
Installing collected packages: PyQtWebEngine-Qt5, pyqtwebengine
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

spyder 4.1.5 requires pyqt5<5.13; python_version >= “3”, but you’ll have pyqt5 5.15.4 which is incompatible.
spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= “3”, but you’ll have pyqtwebengine 5.15.4 which is incompatible.
Successfully installed PyQtWebEngine-Qt5-5.15.2 pyqtwebengine-5.15.4

(base) C:\Users\25023>spyder return
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 42, in check_qt
package_name, required_ver = qt_infos[qtpy.API]
KeyError: ‘pyside2’

(base) C:\Users\25023>pypt5
‘pypt5’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(base) C:\Users\25023>pip check
stockquant 0.1.0 requires baostock, which is not installed.
stockquant 0.1.0 requires colorlog, which is not installed.
stockquant 0.1.0 requires concurrent-log-handler, which is not installed.
stockquant 0.1.0 requires tushare, which is not installed.
qdarkstyle 2.8.1 requires helpdev, which is not installed.
pexpect 4.8.0 requires ptyprocess, which is not installed.
conda 4.10.3 requires ruamel-yaml-conda, which is not installed.
spyder 4.1.5 has requirement pyqt5<5.13; python_version >= “3”, but you have pyqt5 5.15.4.
spyder 4.1.5 has requirement pyqtwebengine<5.13; python_version >= “3”, but you have pyqtwebengine 5.15.4.

(base) C:\Users\25023>pip install pyqt5==5.12.0
Collecting pyqt5==5.12.0
Downloading PyQt5-5.12-5.12.1_a-cp35.cp36.cp37.cp38-none-win32.whl (41.2 MB)
|████████████████████████████████| 41.2 MB 939 kB/s
Collecting PyQt5_sip<4.20,>=4.19.14
Downloading PyQt5_sip-4.19.19-cp38-none-win32.whl (44 kB)
|████████████████████████████████| 44 kB 668 kB/s
Installing collected packages: PyQt5-sip, pyqt5
Attempting uninstall: PyQt5-sip
Found existing installation: PyQt5-sip 12.9.0
Uninstalling PyQt5-sip-12.9.0:
Successfully uninstalled PyQt5-sip-12.9.0
Attempting uninstall: pyqt5
Found existing installation: PyQt5 5.15.4
Uninstalling PyQt5-5.15.4:
Successfully uninstalled PyQt5-5.15.4
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= “3”, but you’ll have pyqtwebengine 5.15.4 which is incompatible.
pyqtwebengine 5.15.4 requires PyQt5>=5.15.4, but you’ll have pyqt5 5.12 which is incompatible.
pyqtwebengine 5.15.4 requires PyQt5-sip<13,>=12.8, but you’ll have pyqt5-sip 4.19.19 which is incompatible.
Successfully installed PyQt5-sip-4.19.19 pyqt5-5.12

(base) C:\Users\25023>pip install pyqtwebengine==5.12.0
Collecting pyqtwebengine5.12.0
Downloading PyQtWebEngine-5.12-5.12.1-cp35.cp36.cp37.cp38-none-win32.whl (40.6 MB)
|████████████████████████████████| 40.6 MB 6.4 MB/s
Requirement already satisfied: PyQt5>=5.12 in c:\users\25023\anaconda3\lib\site-packages (from pyqtwebengine
5.12.0) (5.12)
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in c:\users\25023\anaconda3\lib\site-packages (from PyQt5>=5.12->pyqtwebengine==5.12.0) (4.19.19)
Installing collected packages: pyqtwebengine
Attempting uninstall: pyqtwebengine
Found existing installation: PyQtWebEngine 5.15.4
Uninstalling PyQtWebEngine-5.15.4:
Successfully uninstalled PyQtWebEngine-5.15.4
Successfully installed pyqtwebengine-5.12

解决办法安装spyder匹配的PyQt5版本

pip install pyqt5==5.12.0

pip install pyqtwebengine==5.12.0

##############################
(qlib_dou) C:\Users\25023>pip check
pyqt5-plugins 5.15.4.2.2 has requirement pyqt55.15.4, but you have pyqt5 5.12.1.
qt5-tools 5.15.2.1.2 has requirement click~=7.0, but you have click 8.0.1.
pyqt5-tools 5.14.0.1.7 has requirement pyqt5
5.14.0, but you have pyqt5 5.12.1.
flake8 3.9.0 has requirement pycodestyle<2.8.0,>=2.7.0, but you have pycodestyle 2.6.0.
flake8 3.9.0 has requirement pyflakes<2.4.0,>=2.3.0, but you have pyflakes 2.2.0.
cookiecutter 1.7.2 has requirement Jinja2<3.0.0, but you have jinja2 3.0.0.
cookiecutter 1.7.2 has requirement MarkupSafe<2.0.0, but you have markupsafe 2.0.1.
autopep8 1.5.6 has requirement pycodestyle>=2.7.0, but you have pycodestyle 2.6.0.
(qlib_dou) C:\Users\25023>spyder
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\envs\qlib_dou\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\spyder\app\start.py”, line 223, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\spyder\app\mainwindow.py”, line 60, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\qtpy\QtWebEngineWidgets.py”, line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name

(qlib_dou) C:\Users\25023>pip install pyqt5==5.12.0
Collecting pyqt55.12.0
Using cached PyQt5-5.12-5.12.1_a-cp35.cp36.cp37.cp38-none-win_amd64.whl (49.4 MB)
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in c:\users\25023\anaconda3\envs\qlib_dou\lib\site-packages (from pyqt5
5.12.0) (4.19.19)
Installing collected packages: pyqt5
Attempting uninstall: pyqt5
Found existing installation: PyQt5 5.12.1
Uninstalling PyQt5-5.12.1:
Successfully uninstalled PyQt5-5.12.1
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyqt5-plugins 5.15.4.2.2 requires pyqt55.15.4, but you have pyqt5 5.12 which is incompatible.
pyqt5-tools 5.14.0.1.7 requires pyqt5
5.14.0, but you have pyqt5 5.12 which is incompatible.

Successfully installed pyqt5-5.12

(qlib_dou) C:\Users\25023>spyder
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\envs\qlib_dou\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\spyder\app\start.py”, line 223, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\spyder\app\mainwindow.py”, line 60, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File “C:\Users\25023\anaconda3\envs\qlib_dou\lib\site-packages\qtpy\QtWebEngineWidgets.py”, line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name
解决办法是降级PyQt5 .

pip install PyQt55.10.1==
有空试试https://blog.csdn.net/fwpevil/article/details/88049138

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/342046?site
推荐阅读
相关标签
  

闽ICP备14008679号