Reputation: 41
I use Spyder 5 (Python 3.7.9), although I also installed Python 3.9 but not with Spyder. When I press F8 to run a Static Analysis Code, a message displays:
Traceback (most recent call last):
File "D:\obj\windows-release 37amd64_Release\msi_python\zip_amd64\runpy.py", line 193, in
_run_module_as_main
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 85, in
_run_code
File "C:\Program Files\Spyder\pkgs\pylintmain.py", line 9, in <<module> pylint.run_pylint()
File "C:\Program Files\Spyder\pkgs\pylint_init.py", line 21, in run_pylint from pylint.lint import Run as PylintRun
File "C:\Program Files\Spyder pkgs\pylint\lint_init.py", line 75, in <module> from pylint.lint.parallel import check_parallel
File "C:\Program Files\Spyder\pkgs\pylint\lint\parallel.py", line 7, in <module>
from pylint import reporters File "C:\Program Files\Spyder\pkgs\pylint\reportersinit.py", line 25, in <module>
from pylint import utils
File "C:\Program Files\Spyder\pkgs\pylint\utils_init__.py", line 45, in <module>
from pylint.utils.ast walker import ASTWalker
File "C:\Program Files\Spyder\pkgs\pylint\utils\ast_walker.py", line 6, in <module>
from astroid import nodes
File "C:\Program Files\Spyder\pkgs\astroidinit.py", line 46, in <module>
from pathlib import Path
ModuleNotFoundError: No module named 'pathlib'
Before installing Spyder 5 (I had Spyder 3), it worked, but since I've updated Spyder, it won't anymore.
Thank you!
Upvotes: 4
Views: 477
Reputation: 34156
(Spyder maintainer here) This is a bug in our Windows installer and we'll try to fix it in our next version, to be released in June.
Upvotes: 3
Reputation: 4282
It look like you're in fact using python2 and not python 3.7. Your default python might be python2 so you should try using python3
instead of python
when launching commands, or try changing the default python for your system (if at all possible).
Upvotes: 0