PyCharm 2022.1 and Python 3.10.
When I try to run a Pytest script, I see the following error:
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "z:\Users\...\AppData\Local\Programs\Python\Python310\lib\site.py", line 617, in <module>
main()
File "z:\Users\...\AppData\Local\Programs\Python\Python310\lib\site.py", line 594, in main
known_paths = removeduppaths()
File "z:\Users\...\AppData\Local\Programs\Python\Python310\lib\site.py", line 139, in removeduppaths
dir, dircase = makepath(dir)
File "C:\Users\...\AppData\Local\Programs\Python\Python310\lib\site.py", line 97, in makepath
dir = os.path.join(*paths)
AttributeError: module 'os' has no attribute 'path'
Why could that be happening?