I encounter the “No module named ‘encodings’” error today when I run a Python program, and I found the solution here. I guess the root cause of this error is that, I upgraded my local Python version however the existing “virtualenv” is still looking for the previous Python when I start the Python program. What I need to do is to remove the existing “virtualenv” and create a new one:
1 | rm -rf theenv |