Code analysis does not run due to missing 'pathlib'
See original GitHub issueDescription
What steps will reproduce the problem?
- Load python file into editor.
- Select “Source->Run code analysis”
- Receive error-message that an exception was thrown and that pathlib is missing.
Expected behavior: pathlib should be bundled with the Spyder installer.
Traceback
pylint error:
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:\prog\spyder\pkgs\pylint\__main__.py", line 9, in <module>
pylint.run_pylint()
File "C:\prog\spyder\pkgs\pylint\__init__.py", line 21, in run_pylint
from pylint.lint import Run as PylintRun
File "C:\prog\spyder\pkgs\pylint\lint\__init__.py", line 75, in <module>
from pylint.lint.parallel import check_parallel
File "C:\prog\spyder\pkgs\pylint\lint\parallel.py", line 7, in <module>
from pylint import reporters
File "C:\prog\spyder\pkgs\pylint\reporters\__init__.py", line 25, in <module>
from pylint import utils
File "C:\prog\spyder\pkgs\pylint\utils\__init__.py", line 45, in <module>
from pylint.utils.ast_walker import ASTWalker
File "C:\prog\spyder\pkgs\pylint\utils\ast_walker.py", line 6, in <module>
from astroid import nodes
File "C:\prog\spyder\pkgs\astroid\__init__.py", line 46, in <module>
from pathlib import Path
ModuleNotFoundError: No module named 'pathlib'
Versions
- Spyder version: 5.0.5
- Python version: 3.7.9
- Qt version: 5.12.10
- PyQt5 version: 5.12.3
- Operating System: Windows 10
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
cookiecutter >=1.6.0 : 1.7.3 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree : None (OK)
IPython >=7.6.0 : 7.24.1 (OK)
jedi =0.17.2 : 0.17.2 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 23.0.1 (OK)
nbconvert >=4.0 : 6.1.0 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
paramiko >=2.4.0 : 2.7.2 (OK)
parso =0.7.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.8.0 (OK)
pygments >=2.0 : 2.9.0 (OK)
pylint >=1.0 : 2.8.3 (OK)
pyls >=0.36.2;<1.0.0 : 0.36.2 (OK)
pyls_black >=0.4.6 : 0.4.7 (OK)
pyls_spyder >=0.3.2;<0.4.0 : 0.3.2 (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.2.0 (OK)
qtawesome >=1.0.2 : 1.0.3 (OK)
qtconsole >=5.1.0 : 5.1.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=39.0.0 : 57.0.0 (OK)
sphinx >=0.6.6 : 4.0.2 (OK)
spyder_kernels >=2.0.4;<2.1.0 : 2.0.4 (OK)
textdistance >=4.2.0 : 4.2.1 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog : 2.1.2 (OK)
zmq >=17 : 22.1.0 (OK)
# Optional:
cython >=0.21 : 0.29.23 (OK)
matplotlib >=2.0.0 : 3.4.2 (OK)
numpy >=1.7 : 1.19.3 (OK)
pandas >=1.1.1 : 1.2.5 (OK)
scipy >=0.17.0 : 1.7.0 (OK)
sympy >=0.7.3 : 1.8 (OK)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
ImportError: No module named pathlib - python 2.7
ImportError: No module named pathlib · normally, this means that the python binary you are using isn't the same as the one that...
Read more >Don't Use Python OS Library Any More When Pathlib Can Do
The first operation that I want to start with is to show the Current Working Directory (CWD). It is important because we might...
Read more >Using Python's Pathlib Module - Practical Business Python
Introduction. It is difficult to write a python script that does not have some interaction with the file system. The activity could be...
Read more >pathlib — Object-oriented filesystem paths — Python 3.11.1 ...
If the path doesn't exist and strict is True , FileNotFoundError is raised. If strict is False , the path is resolved as...
Read more >Python - Check if a file or directory exists - GeeksforGeeks
Path classes in pathlib module are divided into pure paths and concrete paths. Pure paths provide only computational operations but do not ......
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 FreeTop 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
Top GitHub Comments
Yeah, please do.
Ok, could you take a look at this before the 5.1.0 release? I hope this is just a matter of including that package in our installer, so it won’t be too difficult.