pip3 --version is throwing an error as of late and I\'m having trouble using pip to install packages to my virtual environment. This is a new issue but I think it could be
I'm certain that 'module_from_spec' exists in 3.6. You can actually specify the exact version that your calling pip on, please give that a try :
pip3.6 install packagename