'How to get rid of the error `package has no attribute '_w_long'`?
Suddenly, I don't know why occurs the error for every python file in this project, let's take for example and use matplotlib.
I tried this:
import matplotlib.pyplot as plt
plt.plot([1,2,3],[1,2,3])
plt.show()
And the error is:
Remainder of file ignored
Traceback (most recent call last):
File "C:\Users\Idensas\PycharmProjects\protest\try.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\Idensas\AppData\Local\Programs\Python\Python39\lib\site-packages\matplotlib\__init__.py", line 89, in <module>
import importlib
File "C:\Users\Idensas\PycharmProjects\OneMoreTime\pypy\lib-python\3\importlib\__init__.py", line 51, in <module>
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
There are more errors but I omit that, because they all same like this above, errors with:
- protobuf-3.18.0-py3.9-nspkg.pth
- matplotlib-3.5.1-py3.9-nspkg.pth
- googleapis_common_protos-1.53.0-py3.9-nspkg.pth
- distutils-precedence.pth
I took a look at some same questions like mine, but nothing helped me. I have installed only one version of python, this was years ago. I just turn on my PC, go to PyCharm and an error today is occurs. Uhh...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
