This time, I will write what to do when an error like the one in the title occurs, based on my actual experience.
Error processing line 3 of /home/cjones/.local/lib/python3.6/site-packages/googleapis_common_protos-1.5.8-py3.6-nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python3.6/site.py", line 174, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 568, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
From your error statement, find a path similar to the one at the top of the error content in this article. (The penultimate one should say "site-packages".) Go to the terminal that corresponds to that path.
# /home/cjones/.local/lib/python3.6/site-packages/
#Like this "site-Please enter up to "packages"
$cd found path
When the move is complete, type in the terminal as follows:
# googleapis_common_protos-1.5.8-py3.6-nspkg.pth
# site-Type in the parts after packages.
$ vi site-Parts after packages
This will open the file, so press "i" to enter edit mode.
import sys, types, os;has_mfs = sys.version_info > (3, 5);p ...<rest of file>
Find this part and insert a line break as follows.
import sys, types, os;
has_mfs = sys.version_info > (3, 5);p ...<rest of file>
When you're done, press "esc".
Finally, press ": wq" to save + exit, so you're done.
I will continue to publish articles about the errors I have experienced.
AttributeError: 'NoneType' object has no attribute 'loader'
pip install pyomo corrupts python3 virtualenv #95
Frequently used commands in the terminal
Recommended Posts