Cannot launch Spyder Mac

I cannot launch Spyder as I have reinstalled many times, the problems are listed below:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/utils/external/lockfile.py”, line 164, in lock
symlink(str(os.getpid()), self.name)
FileExistsError: [Errno 17] File exists: ‘90226’ → ‘/Users/user/.spyder-py3/spyder.lock’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/utils/external/lockfile.py”, line 191, in lock
kill(int(pid), 0)
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py”, line 204, in main
lock_created = lock.lock()
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/utils/external/lockfile.py”, line 199, in lock
rmlink(self.name)
PermissionError: [Errno 13] Permission denied: ‘/Users/user/.spyder-py3/spyder.lock’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtpy/QtWebEngineWidgets.py”, line 21, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ModuleNotFoundError: No module named ‘PyQt5.QtWebEngineWidgets’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/bin/spyder”, line 11, in
sys.exit(main())
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py”, line 224, in main
from spyder.app import mainwindow
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py”, line 59, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtpy/QtWebEngineWidgets.py”, line 27, in
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named ‘PyQt5.QtWebKitWidgets’

1 Like

Same problem here.

Having a Mac Pro 14 (M1 PRO) Anaconda first provided me with the old Mac installer (x64), and after installing it and it not working, I downloaded the correct installer, and when trying to install it I get the same error.

I find that the problems above can be solved by the solution below:python - How to solve error while installing pyqtwebengine - Stack Overflow

However, there is new problems after I input the codes suggested above as below when I tried to launch Anaconda Navigator:

Traceback (most recent call last):
File “/Users/user/opt/anaconda3/bin/anaconda-navigator”, line 7, in
from anaconda_navigator.app.main import main
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/anaconda_navigator/app/main.py”, line 19, in
from anaconda_navigator.app.start import start_app
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/anaconda_navigator/app/start.py”, line 16, in
from qtpy.QtCore import QCoreApplication, QEvent, QObject, Qt # pylint: disable=no-name-in-module
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/qtpy/QtCore.py”, line 57, in
from PyQt5.QtCore import *
ModuleNotFoundError: No module named ‘PyQt5.QtCore’

also, there is still problem when I tried to launch Spyder:
Traceback (most recent call last):
File “/Users/user/opt/anaconda3/bin/spyder”, line 11, in
sys.exit(main())
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py”, line 233, in main
from spyder.app import mainwindow
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py”, line 42, in
requirements.check_qt()
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/spyder/requirements.py”, line 47, in check_qt
if parse_version(actual_ver) < parse_version(required_ver):
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py”, line 120, in parse_version
return packaging.version.Version(v)
File “/Users/user/opt/anaconda3/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py”, line 264, in init
match = self._regex.search(version)
TypeError: expected string or bytes-like object

conda info

 active environment : base
active env location : /Users/user/opt/anaconda3
        shell level : 1
   user config file : /Users/user/.condarc

populated config files :
conda version : 4.12.0
conda-build version : 3.21.8
python version : 3.9.12.final.0
virtual packages : __osx=12.3.1=0
__unix=0=0
__archspec=1=arm64
base environment : /Users/user/opt/anaconda3 (writable)
conda av data dir : /Users/user/opt/anaconda3/etc/conda
conda av metadata url : None
package cache : /Users/user/opt/anaconda3/pkgs
/Users/user/.conda/pkgs
envs directories : /Users/user/opt/anaconda3/envs
/Users/user/.conda/envs
platform : osx-arm64
user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.12 Darwin/21.4.0 OSX/12.3.1
UID:GID : 501:20
netrc file : None
offline mode : False