Spyder won't launch if mccabe is upgraded to 0.7.0
See original GitHub issueIssue Report Checklist
- [v] Searched the issues page for similar reports
- [v] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - [v] Tried basic troubleshooting (if a bug/error)
- [v] Restarted Spyder
- [v] Reset preferences with
spyder --reset
- [v] Reinstalled the latest version of Anaconda
- [v] Tried the other applicable steps from the Troubleshooting Guide
- [v] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
I recently upgraded my packages and noticed that Spyder will no longer launch after that. Traceback shows that Spyder expected a mccabe version >=0.6.0 and <0.7.0. So I tried downgrade the said package using pip, and the Spyder then launched with no problem. I don’t know if this is a known problem, but I search and found no issues related so I opened one.
What steps reproduce the problem?
- Launched the Spyder.
- It won’t launch.
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 573, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 891, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 782, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (mccabe 0.7.0 (/usr/lib/python3.10/site-packages), Requirement.parse('mccabe<0.7.0,>=0.6.0'), {'flake8'})
Versions
- Spyder version: 5.3.0
- Python version: 3.10.2 64-bit
- Qt version: 5.15.2
- PyQt version: 5.15.6
- Operating System name/version: Linux 5.15.28-1-MANJARO
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 2.0.0 (OK)
cookiecutter >=1.6.0 : 1.7.3 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.31.1;<8.0.0 : 7.32.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.1 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 23.4.0 (OK)
nbconvert >=4.0 : 6.4.3 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
parso >=0.7.0;<0.9.0 : 0.8.2 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.0 (OK)
pygments >=2.0 : 2.11.2 (OK)
pylint >=2.5.0 : 2.12.2 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.4.1;<1.5.0 : 1.4.1 (OK)
pylsp_black >=1.2.0 : 1.2.0 (OK)
qdarkstyle >=3.0.2;<3.1.0 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.2.1 (OK)
qtawesome >=1.0.2 : 1.0.3 (OK)
qtconsole >=5.3.0;<5.4.0 : 5.3.0 (OK)
qtpy >=2.0.1 : 2.0.1 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=49.6.0 : 59.3.0 (OK)
sphinx >=0.6.6 : 4.4.0 (OK)
spyder_kernels >=2.3.0;<2.4.0 : 2.3.0 (OK)
textdistance >=4.2.0 : 4.2.2 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 0.10.7 (OK)
xdg >=0.26 : 0.27 (OK)
zmq >=17 : 22.3.0 (OK)
# Optional:
cython >=0.21 : 0.29.28 (OK)
matplotlib >=3.0.0 : 3.5.1 (OK)
numpy >=1.7 : 1.22.3 (OK)
pandas >=1.1.1 : 1.4.1 (OK)
scipy >=0.17.0 : 1.8.0 (OK)
sympy >=0.7.3 : 1.10 (OK)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Can no Longer open Spyder IDE for Python Programming
My problem appeared to be that the status of spyder was still running so wouldn't open. To fix this you need to look...
Read more >Spyder IDE no longer works after upgrade to ArcGIS Pro 2.5
Hi Dan,. I get a similar problem when I try to run a script in Jupyter after updating to ArcPro 2.5 and doing...
Read more >Update requests for packages imported from Arch Linux
Spyder requires ('mccabe<0.7.0,>=0.6.0') but mccabe is 0.70, hence the package won't start. This issue is already reported in arch ...
Read more >FS#73953 : [flake8] spyder crashes at startup - Arch Linux
Description: Spyder refuses to start, due to error in flake8. The dependency of python-mccabe < 0.7 is not met in latest versions on...
Read more >conda install spyder stuck on solving environment - You.com
if it doesn't work then try this. conda update conda. if nothing works try seeing this github solution, it worked for many. Open...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Look, rolling release distros work well for simple things, but not for something like Spyder, which has more than 100 dependencies between direct and indirect ones. For more thorough discussions about this point, please see:
No, it’s not. As I said above, Spyder is always semi-broken on Arch (and other rolling release distros, I guess, but the only one we receive reports for is Arch).
That’s why now we advise our users to stay away from the Arch packages. Furthermore, we’d really prefer if Arch would stop distributing Spyder. That’s because Spyder is never going to work reliably on Arch given that it’s always trying to force Spyder to work with dependencies is not ready for.
I don’t know, but sometimes that’s a really bad guess (e.g. Jedi has broken us in x.x.x releases)
Because it’s not something we can solve here (as the traceback makes it clear). The problem is in flake8, which requires mccable
>=0.6.0,<0.7.0
. And we follow the same requirement inpython-lsp-server
, which depends on both projects (so this is an issue in a dependency of a Spyder dependency, over which we have no control). Without those requirements, either Spyder crashes orpython-lsp-server
probably does, which breaks our code completion and linting facilities.I didn’t say you should run
sudo pip
, which I know is very dangerous. I said you need to use a virtualenv: